Kaltura player not getting along with Apple devices (HLS)

Hello,

I can’t seem to reliably play HLS content on Apple products running IOS. The player (v2.81) loads correctly and I don’t get any error in the js console or by running kaltlog but when I press play, it doesn’t work. In Safari, I get the loading spinner and nothing else. In Chrome, pressing play doesn’t work either (fires player events “playing” then “paused”) but if I manually choose a flavor from the player itself (ie 720p), the media starts playing. Note also that only the lowest flavor is available for selection, even if there are multiple available for the entry. It seems like the player has trouble handling multiple streams from an IOS device.

Everything works flawlessly on Windows and Android. Media starts playing when play is pressed as expected.

I have found a workaround but it is not really an acceptable one, being that I use progressive download when an Apple device is detected by setting “Kaltura.UseAppleAdaptive” to false. But I want HLS delivery across all plateforms.

I’m running out of ideas on how to fix this. Any help would be much appreciated.

Thanks

More info on this after some more tests. I confirmed that even the built-in player in the Kaltura Management Console (both the preview player in an entry and a custom player in Universal Studio) do not work on Apple devices, be it an iPad or a macOS computer. The spinner just spins and the video never plays. On macs we get a “net::ERR_CONNECTION_TIMED_OUT” error in the js console.

This basically removes from the equation any code I might have added to the player on the front end side of things. The core code of the Kaltura Player simply doesn’t work on macs for me.

Now is there something that I can tweak in the server config to work around this?. Maybe in the delivery profiles? But unless shown otherwise this looks like a serious bug / limitation to me. I was able to play HLS on macs when using a previous custom coded player built around Hls.js. We shouldn’t have to settle for progressive download on Apple devices considering they support HLS natively.

Hopefully I got something wrong. Please advise if I did.

Thanks for any help

Hello,

See my reply here:

And here:

Basically, you need to start by finding the failing requests made by the player when hitting play and then go over the configuration and logs as detailed in the second post I referred you to above.

Hello @jess, thanks for the reply.

It is pretty hard for me to troubleshoot this since the failing only happens on macs and I don’t have one on hands. I had a colleague (remotely) test what has been mentionned in my previous post with the described results. I also was told that clicking “play” on the player would generate no requests at all from the network tab which I found curious so I left that detail out of my post. The only error in the js console was the net::ERR_CONNECTION_TIMED_OUT error I mentionned.

I can of course check that it is in fact not working on an iPad but since I don’t have access to the dev tools from that device, there’s not much else I can do with that. I was however able to run kaltlog while I was attempting to play through the iPad but got no warning or error.

I’m starting to wonder if this could be a closed port causing the problem. I’ll have to check with the networking team. But I don’t understand how if it’s the case it could work on Windows but fail on a Mac.

I do get some errors in kaltlog when I navigate through the kmc in a Windows environnement.

Here they are:

==> /opt/kaltura/log/batch/clearcuepoints-0-2020-04-14.err.log <==
PHP Fatal error:  Uncaught KalturaException: Internal server error occurred in /                                                   opt/kaltura/app/batch/client/KalturaClientBase.php:912
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(4440): KalturaClientBase->thr                                                   owExceptionIfError(Array)
--
2020-04-14 17:12:54 [0.001878] [132.207.22.115] [1952248151] [65] [API] [elasticClient->sendReq                                    uest] DEBUG: Elastic took - 0.00051188468933105 seconds
2020-04-14 17:12:54 [0.000149] [132.207.22.115] [1952248151] [66] [API] [elasticClient->sendReq                                    uest] ERR: Exception: Elastic client curl error code[7] message[Failed connect to 127.0.0.1:920                                    0; Connection refused] in /opt/kaltura/app/infra/log/KalturaLog.php:88
Stack trace:
#0 /opt/kaltura/app/plugins/search/providers/elastic_search/client/elasticClient.php(162): Kalt                                    uraLog::err('Elastic client ...')
--
#13 {main}
2020-04-14 17:12:54 [0.000132] [132.207.22.115] [1952248151] [67] [API] [kElasticSearchManager-                                    >execElastic] ERR: Exception: Failed to Execute elasticSearch query: Array
(
--
 in /opt/kaltura/app/infra/log/KalturaLog.php:88
Stack trace:
#0 /opt/kaltura/app/plugins/search/providers/elastic_search/lib/kElasticSearchManager.php(164):                                     KalturaLog::err('Failed to Execu...')
--
2020-04-14 17:12:55 [0.000342] [132.207.22.115] [1080563616] [19] [API] [KalturaStatement->exec                                    ute] DEBUG: Sql took - 0.0002899169921875 seconds
2020-04-14 17:12:55 [0.019414] [132.207.22.115] [1079483506] [24] [API] [KalturaFrontController                                    ->getExceptionObject] ERR: KalturaAPIException: The usage of feature [dropFolder] is forbidden                                     in /opt/kaltura/app/plugins/drop_folder/services/DropFolderService.php:16
Stack trace:
#0 /opt/kaltura/app/api_v3/lib/reflection/KalturaActionReflector.php(255): DropFolderService->i                                    nitService('dropfolder_drop...', 'dropFolder', 'list')
--
2020-04-14 17:13:10 [0.000346] [132.207.22.115] [1973902913] [31] [PS2] [KalturaStatement->exec                                    ute] DEBUG: Sql took - 0.00030183792114258 seconds
2020-04-14 17:13:10 [0.001296] [132.207.22.115] [1973902913] [32] [PS2] [KExternalErrors::dieEr                                    ror] ERR: Exception: exiting on error 38 - The provided parameter is not allowed in /opt/kaltur                                    a/app/infra/log/KalturaLog.php:88
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/KExternalErrors.class.php(136): KalturaLog::err('exi                                    ting on erro...')
--
2020-04-14 17:14:00 [0.000346] [132.207.22.115] [979655467] [31] [PS2] [KalturaStatement->execute] DEBUG: Sql took - 0.00029897689819336 seconds
2020-04-14 17:14:00 [0.001513] [132.207.22.115] [979655467] [32] [PS2] [KExternalErrors::dieError] ERR: Exception: exiting on error 38 - The provided parameter is not allowed in /opt/kaltura/app/infra/log/KalturaLog.php:88
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/KExternalErrors.class.php(136): KalturaLog::err('exiting on erro...')

I’d rather not post my server in a public forum but I could send you a video link privately if you think it could help troubleshoot.

Also here is the content of delivery_profile (“myserver” is my edit and the protocol was not part of the server name):

MariaDB [kaltura]> select id,name,url,host_name from delivery_profile;
+------+------------------------------------------------+---------------------------------+------------------+
| id   | name                                           | url                             | host_name        |
+------+------------------------------------------------+---------------------------------+------------------+
|    1 | Default HTTP Delivery Profile                  | myserver                        | NULL             |
|    2 | Default HTTP Delivery Profile                  | myserver                        | NULL             |
|    3 | Default HLS Live Delivery Profile              | NULL                            | NULL             |
|    4 | Default HLS Network Live Delivery Profile      | NULL                            | NULL             |
|    5 | Default HLS To Multicast Live Delivery Profile | NULL                            | NULL             |
|  301 | Default MPEG-DASH Live Delivery Profile        | NULL                            | NULL             |
|  302 | Default HD Network Live Delivery Profile       | NULL                            | NULL             |
|  303 | Default HDS Live Delivery Profile              | NULL                            | NULL             |
|  304 | Kaltura Live Packager Dash segmentation        | myserver:8443/live/dash         | myserver         |
|  305 | Kaltura Live Packager HDS segmentation         | myserver:8443/live/hds          | myserver         |
|  306 | Kaltura Live Packager HLS segmentation         | myserver:8443/live/hls          | myserver         |
|  307 | Kaltura Live Packager MSS segmentation         | myserver:8443/live/mss          | myserver         |
|  308 | Default RTMP Live Delivery Profile             | NULL                            | NULL             |
| 1001 | Kaltura HLS segmentation                       | myserver:8443/hls               | myserver         |
| 1002 | Kaltura HDS segmentation                       | myserver:8443/hds               | myserver         |
| 1003 | Kaltura DASH segmentation                      | myserver:8443/dash              | myserver         |
+------+------------------------------------------------+---------------------------------+------------------+

Finally, with sensitive info removed:

[root@media ~]# curl -I -v https://myserver:8443
* About to connect() to myserver port 8443 (#0)
*   Trying...
* Connected to myserver port 8443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*       subject: CN=myserver,O=removed
*       start date: Mar 25 13:26:11 2020 GMT
*       expire date: Mar 25 13:56:11 2021 GMT
*       common name: myserver
*       issuer: CN=Entrust Certification Authority - L1K,OU="(c) 2012 Entrust, Inc. - for authorized use only",OU=See www.entrust.net/legal-terms,O="Entrust, Inc.",C=US
> HEAD / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: myserver:8443
> Accept: */*
>
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Server: nginx/1.16.1
Server: nginx/1.16.1
< Date: Tue, 14 Apr 2020 21:46:05 GMT
Date: Tue, 14 Apr 2020 21:46:05 GMT
< Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1
< Connection: keep-alive
Connection: keep-alive
< Location: https:// myserver:8443/start/index.php
Location: https:// myserver:8443/start/index.php

<
* Connection #0 to host myserver left intact