Description
We are currently using Video.js within an embedded environment in a Tizen TV web application and have observed on at least some 2018 model TVs with HLS AES-128 protected content with Google SSAI based metadata events that playback will end up in an endless cycle of buffering every few seconds after approximately 20-35 minutes of playback, consistently. This model of TV seems to use V8 with Chromium M56 under the hood. More information on device specifications can be found here:
https://developer.samsung.com/tv/develop/specifications/general-specifications#platform-features
We have also had to use the following configuration when creating the player:
var video = document.createElement("video");
video.id = "videojs_player";
video.style.width = "100%";
video.style.height = "100%";
document.body.appendChild(video);
var player = videojs(video.id, {
controls: false,
autoplay: false,
loadingSpinner: false,
html5: {
nativeTextTracks: false,
nativeAudioTracks: false,
nativeVideoTracks: false,
hls: { // applies to DASH as well
overrideNative: true
}
}
});
Due to Video.js' default behaviour of leveraging native streaming support under the hood, which is fundamentally broken on Tizen TV's, hence our search for an alternative video player solution to use other than the built-in AVPlay API which uses the Samsung NaCl player when using native tracks. More information on these players can be found here, if needed:
https://developer.samsung.com/tv/develop/api-references/samsung-product-api-references/avplay-api
https://developer.samsung.com/onlinedocs/tv/NaCl/NaClPlayerAPI/class_samsung_1_1_na_cl_player_1_1_media_player.html
When using native tracks, we experience freezes when playing content due to HTTP re-directs and a broken CURL implementation that the NaCl player uses which triggers an immediate timeout and failure that is ultimately not very gracefully handled.
In any case, this is no longer an issue as we are overriding the native tracks, which has led us to the buffering issue.
We have ruled out any possibility of network issues as we have tested in multiple locations on multiple devices with both poor and excellent quality networks. It is possibly worth noting that no quality scaling appears to occur when the buffering cycle begins. We suspect this may be related to a memory leak, but have not confirmed anything yet.
Not sure if this is related to #464 or possibly https://github.com/videojs/http-streaming/pull/643/files
Any additional insight or suggestions for further troubleshooting or resolving this problem would be greatly appreciated as it is currently affecting multiple projects.
We are going to try a custom build of Video.js with the aforementioned PRs to see if this helps at all as well.
Thanks!
Sources
Uncertain, will need to test other assets to verify if it is specific to our type of content. Unable to share problematic content due to encryption and key expiry, will see about obtaining unencrypted content to re-produce the issue with, but this will likely require a specific Tizen 2018 device.
Steps to reproduce
- Load Video.js and content, and start playback
- Leave video playing for approximately 20-30 minutes
- Observe that the player has now entered an endless cycle of infinite buffering every few seconds
Results
Expected
The video should play successfully without endlessly buffering every few seconds.
Error output
None, but if it is relevant, here are the logs for the unrelated aforementioned freeze issue from the Tizen TV device:
E/STREAMING_ENGINE( 916): Curl.cpp: ResultIf(1974) > [Warning] CURLE_OPERATION_TIMEDOUT occured!
E/STREAMING_ENGINE( 916): Curl.cpp: ResultIf(1989) > Curl Download Error!!: pause(0), interrupt(0), has(-53), Curl(28), http(200), now(2168732), total(3840276), https://rcavlive-dai.akamaized.net/hls/live/696614/cancbftprem/20190819T033438/master_5000/00010/master_5000_00935.ts, curlID(-1)
E/STREAMING_ENGINE( 916): Curl.cpp: ResultIf(2014) > Curl Retry on operation timeout: retry(0), pause(0), interrupt(0), now(2168732), total(3840276), url(https://rcavlive-dai.akamaized.net/hls/live/696614/cancbftprem/20190819T033438/master_5000/00010/master_5000_00935.ts)
E/STREAMING_ENGINE( 916): CHLSDataProcessMgr.cpp: StateError(852) > >> CHLSDataProcessMgr::StateError -53
E/STREAMING_ENGINE( 916): CHLSDataProcessMgr.cpp: StateError(880) > !! CHLSDataProcessMgr::StateError -53
E/STREAMING_ENGINE( 916): CHLSDataFetcher.cpp: LoadData(1457) > [Audio-Seg] Download next segment
E/WEBAPI_PLUGINS( 6326): avplay_adapter.cc: setErrorEventCBNative(2113) > Entered and the error_code = [-26476506]
E/WEBAPI_PLUGINS( 6326): avplay_adapter.cc: setErrorEventCBNative(2185) > PLAYER_ERROR_CONNECTION_FAILED
I/TIZEN_N_PLAYER( 6326): player.c: player_get_state(2572) > player address:[0xb62638]
Additional Information
videojs-http-streaming version
videojs-http-streaming 1.10.3
videojs version
video.js 7.6.3
Browsers
Embedded (V8 / Chromium M56)
Platforms
2018 Tizen TV
Other Plugins
No.
Other JavaScript
Babel Polyfill (Uncertain of version)
Stacktrace.js: https://github.com/stacktracejs/stacktrace.js (The version with promises and polyfills)
Extra Utilities: https://github.com/nitro404/extra-utilities (Custom version of this library with some functions and all sub-dependencies removed)
Tizen Web APIs: https://developer.samsung.com/tv/develop/api-references/samsung-product-api-references/webapi-api
Tizen Web Device APIs: https://developer.samsung.com/tv/develop/api-references/tizen-web-device-api-references/tizen-api
Other proprietary scripts to allow the Samsung NaCl (Google Native Client) Pepper 56 embedded C++ module to communicate with the web layer (the application is written in C++ with OpenGL rendering, but this is irrelevant to the issue)
EDIT: Formatting.
Description
We are currently using Video.js within an embedded environment in a Tizen TV web application and have observed on at least some 2018 model TVs with HLS AES-128 protected content with Google SSAI based metadata events that playback will end up in an endless cycle of buffering every few seconds after approximately 20-35 minutes of playback, consistently. This model of TV seems to use V8 with Chromium M56 under the hood. More information on device specifications can be found here:
https://developer.samsung.com/tv/develop/specifications/general-specifications#platform-features
We have also had to use the following configuration when creating the player:
Due to Video.js' default behaviour of leveraging native streaming support under the hood, which is fundamentally broken on Tizen TV's, hence our search for an alternative video player solution to use other than the built-in AVPlay API which uses the Samsung NaCl player when using native tracks. More information on these players can be found here, if needed:
https://developer.samsung.com/tv/develop/api-references/samsung-product-api-references/avplay-api
https://developer.samsung.com/onlinedocs/tv/NaCl/NaClPlayerAPI/class_samsung_1_1_na_cl_player_1_1_media_player.html
When using native tracks, we experience freezes when playing content due to HTTP re-directs and a broken CURL implementation that the NaCl player uses which triggers an immediate timeout and failure that is ultimately not very gracefully handled.
In any case, this is no longer an issue as we are overriding the native tracks, which has led us to the buffering issue.
We have ruled out any possibility of network issues as we have tested in multiple locations on multiple devices with both poor and excellent quality networks. It is possibly worth noting that no quality scaling appears to occur when the buffering cycle begins. We suspect this may be related to a memory leak, but have not confirmed anything yet.
Not sure if this is related to #464 or possibly https://github.com/videojs/http-streaming/pull/643/files
Any additional insight or suggestions for further troubleshooting or resolving this problem would be greatly appreciated as it is currently affecting multiple projects.
We are going to try a custom build of Video.js with the aforementioned PRs to see if this helps at all as well.
Thanks!
Sources
Uncertain, will need to test other assets to verify if it is specific to our type of content. Unable to share problematic content due to encryption and key expiry, will see about obtaining unencrypted content to re-produce the issue with, but this will likely require a specific Tizen 2018 device.
Steps to reproduce
Results
Expected
The video should play successfully without endlessly buffering every few seconds.
Error output
None, but if it is relevant, here are the logs for the unrelated aforementioned freeze issue from the Tizen TV device:
Additional Information
videojs-http-streaming version
videojs-http-streaming 1.10.3
videojs version
video.js 7.6.3
Browsers
Embedded (V8 / Chromium M56)
Platforms
2018 Tizen TV
Other Plugins
No.
Other JavaScript
Babel Polyfill (Uncertain of version)
Stacktrace.js: https://github.com/stacktracejs/stacktrace.js (The version with promises and polyfills)
Extra Utilities: https://github.com/nitro404/extra-utilities (Custom version of this library with some functions and all sub-dependencies removed)
Tizen Web APIs: https://developer.samsung.com/tv/develop/api-references/samsung-product-api-references/webapi-api
Tizen Web Device APIs: https://developer.samsung.com/tv/develop/api-references/tizen-web-device-api-references/tizen-api
Other proprietary scripts to allow the Samsung NaCl (Google Native Client) Pepper 56 embedded C++ module to communicate with the web layer (the application is written in C++ with OpenGL rendering, but this is irrelevant to the issue)
EDIT: Formatting.