diff options
author | Anton Schubert | 2017-05-28 03:37:40 +0200 |
---|---|---|
committer | Anton Schubert | 2017-05-28 03:37:40 +0200 |
commit | a1cc81790f8a04108ff56739ba284d600c9fd4e9 (patch) | |
tree | 95612f6f6161a97f2819fcf5580ce4c926de2596 /template/assemblies | |
parent | d823c8614fff8c7210963465760a8f96fd42e4df (diff) |
update dash-player to simultaneous dash/hls player
Diffstat (limited to 'template/assemblies')
-rw-r--r-- | template/assemblies/player/dash.phtml | 14 | ||||
-rw-r--r-- | template/assemblies/switcher/dash.phtml | 8 |
2 files changed, 15 insertions, 7 deletions
diff --git a/template/assemblies/player/dash.phtml b/template/assemblies/player/dash.phtml index 8a70d25..7048006 100644 --- a/template/assemblies/player/dash.phtml +++ b/template/assemblies/player/dash.phtml @@ -1,4 +1,3 @@ -<script type="text/javascript" src="<?=h($assets)?>clapprio/clappr.min.js"></script> <script type="text/javascript" src="<?=h($assets)?>clapprio/dash-shaka-playback.js"></script> <script type="text/javascript" src="<?=h($assets)?>clapprio/level-selector.min.js"></script> <script type="text/javascript" src="<?=h($assets)?>clapprio/audio-selector.min.js"></script> @@ -12,21 +11,22 @@ interference with the new dash-player. --> <script type="text/javascript"> + var nativeHLS = document.createElement('video').canPlayType('application/vnd.apple.mpegURL') != ""; var player = new Clappr.Player({ - // source: "http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd", - source: '<?=h($room->getDashManifestUrl())?>', + source: nativeHLS ? '<?=h($room->getHLSPlaylistUrl())?>' : '<?=h($room->getDashManifestUrl())?>', width: "100%", plugins: [DashShakaPlayback, LevelSelector, AudioSelector], shakaConfiguration: { - preferredAudioLanguage: 'de-DE', - streaming: { - rebufferingGoal: 15 - } + abr: { + defaultBandwidthEstimate: 600000 + }, }, autoPlay: true, parentId: '#player' }); </script> + + <style type="text/css"> #player > [data-player] { padding-bottom: 56.25%; diff --git a/template/assemblies/switcher/dash.phtml b/template/assemblies/switcher/dash.phtml index 164af12..63b8381 100644 --- a/template/assemblies/switcher/dash.phtml +++ b/template/assemblies/switcher/dash.phtml @@ -22,6 +22,14 @@ </a> </div> + <div class="btn-group" role="group"> + <div class="btn btn-primary" disabled>HLS</div> + <a href="<?=h($room->GetHLSPlaylistUrl())?>" target="_blank" class="btn btn-default"> + <span class="fa fa-flask"></span> + Playlist + </a> + </div> + </div> </div> </div> |