Skip to content

Commit

Permalink
Setting preload to auto allows resuming in WebOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Roi Saltzman committed Jun 26, 2022
1 parent 1d2494c commit ad1fd3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/htmlVideoPlayer/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,9 @@ function tryRemoveElement(elem) {
// Can't autoplay in these browsers so we need to use the full controls, at least until playback starts
if (!appHost.supports('htmlvideoautoplay')) {
html += '<video class="' + cssClass + '" preload="metadata" autoplay="autoplay" controls="controls" webkit-playsinline playsinline>';
} else if (browser.web0s){
// in webOS, setting peload auto allows resuming videos
html += '<video class="' + cssClass + '" preload="auto" autoplay="autoplay" webkit-playsinline playsinline>';
} else {
// Chrome 35 won't play with preload none
html += '<video class="' + cssClass + '" preload="metadata" autoplay="autoplay" webkit-playsinline playsinline>';
Expand Down

0 comments on commit ad1fd3c

Please sign in to comment.