mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-13 15:46:46 +03:00
4f35f23fb5
Checks to see if a seek is within the buffered zone or not. Clears the SourceBuffer if seeking outside the buffered zone. This allows the efficient indexed lookup for inserted segments to still be used while streaming, optimizes buffered seeks, keeps the playback timeline sane in spite of the browser's eviction strategy, and obviates the need for an earlier fix for some other MSE weirdness. Closes #15. Change-Id: I0226ebb679fab6739d3d0cc071e22f434983c9d2
163 lines
5.9 KiB
HTML
163 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
Copyright 2014 Google Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Shaka Player Test</title>
|
|
<link rel="stylesheet" href="index.css"></link>
|
|
<script src="load.js"></script>
|
|
<script src="app.js"></script>
|
|
</head>
|
|
<body>
|
|
<table>
|
|
<!-- Common rows -->
|
|
<tr>
|
|
<td colspan="2" class="heading">Stream Setup</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Force prefixed EME?</td>
|
|
<td><input id="forcePrefixed" type="checkbox"></input></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Stream type:</td>
|
|
<td>
|
|
<select id="streamTypeList" onchange="app.onStreamTypeChange()">
|
|
<option value="dash">DASH</option>
|
|
<option value="http">HTTP</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- HTTP stream rows -->
|
|
<tr class="http">
|
|
<td>Media URL:</td>
|
|
<td><input id="mediaUrlInput" type="text"></input></td>
|
|
</tr>
|
|
<tr class="http">
|
|
<td>Key system:</td>
|
|
<td>
|
|
<select id="keySystemList">
|
|
<option value="org.w3.clearkey">org.w3.clearkey</option>
|
|
<option value="com.widevine.alpha">com.widevine.alpha</option>
|
|
<option value="net.bogus.keysystem">net.bogus.keysystem</option>
|
|
<option value="">(none)</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr class="http">
|
|
<td>License server URL:</td>
|
|
<td><input id="licenseServerUrlInput" type="text"></input></td>
|
|
</tr>
|
|
<tr class="http">
|
|
<td>Subtitles URL:</td>
|
|
<td><input id="subtitlesUrlInput" type="text"></input></td>
|
|
</tr>
|
|
|
|
<!-- DASH stream rows -->
|
|
<tr class="dash">
|
|
<td>Preferred language:</td>
|
|
<td><input id="preferredLanguage"></input></td>
|
|
</tr>
|
|
<tr class="dash">
|
|
<td>Test manifest:</td>
|
|
<td>
|
|
<select id="mpdList" onchange="app.onMpdChange()">
|
|
<option value="assets/angel_one.mpd">"Angel One" (TNG clip) - multilingual, subtitles, VP8</option>
|
|
<option value="assets/car-20120827-manifest.mpd">"Car" (YT DASH test) - MP4</option>
|
|
<option value="assets/car_cenc-20120827-manifest.mpd">"Car/CENC" (YT DASH EME test) - MP4, ClearKey</option>
|
|
<option value="assets/feelings_vp9-20130806-manifest.mpd">"Feelings" (YT DASH test) - VP9</option>
|
|
<option value="assets/feelings_audio_only-20130806-manifest.mpd">"Feelings" (YT DASH test) - Audio only</option>
|
|
<option value="//storage.googleapis.com/gtv-videos-bucket/dash/CarWidevine/car.mpd">"Car/SegmentTemplate" (Chromecast test) - MP4 (no SIDX, audio only), Widevine</option>
|
|
<option value="//download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-main-multi/mp4-main-multi-mpd-AV-NBS.mpd">GPAC/SegmentList (conformance test)</option>
|
|
<option value="assets/oops_cenc-20121114-signedlicenseurl-manifest.mpd">"Oops" (HTTPS enabled YT DASH EME test) - MP4, multi-DRM</option>
|
|
<option value="assets/oops_cenc_pssh.mpd">"Oops" (modified YT DASH EME test) - MP4, Widevine, PSSH in MPD</option>
|
|
<option value="http://storage.googleapis.com/wv-demo-media/sintel-1080p/dash.mpd">"Sintel" (1080p high bitrate test) - MP4</option>
|
|
<option value="">(custom)</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr class="dash">
|
|
<td>Custom manifest URL:</td>
|
|
<td>
|
|
<input id="manifestUrlInput" type="text" style="width: 98%;" oninput="app.onMpdCustom()"></input>
|
|
</td>
|
|
</tr>
|
|
<tr class="dash">
|
|
<td>
|
|
Custom WV license server URL:
|
|
<span title="If specified, overrides interpretation of ContentProtection elements in the manifest. Implies the use of Widevine.">[?]</span>
|
|
</td>
|
|
<td>
|
|
<input id="wvLicenseServerUrlInput" type="text" style="width: 98%;"></input>
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- Common rows -->
|
|
<tr>
|
|
<td colspan="2">
|
|
<button onclick="app.loadStream();">Load stream</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<table>
|
|
<tr>
|
|
<td colspan="2" class="heading">Stream info</td>
|
|
<td id="version"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Available video tracks:</td>
|
|
<td><select id="videoTracks" onchange="app.onVideoChange()"></select></td>
|
|
<td>
|
|
Enable adaptation?
|
|
<input id="adaptationEnabled" type="checkbox" checked onchange="app.onAdaptationChange()"></input>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Available audio tracks:</td>
|
|
<td><select id="audioTracks" onchange="app.onAudioChange()"></select></td>
|
|
<td><button onclick="app.cycleAudio()">Cycle audio tracks</button></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Available text tracks:</td>
|
|
<td><select id="textTracks" onchange="app.onTextChange()"></select></td>
|
|
<td>
|
|
Enable subs?
|
|
<input id="textEnabled" type="checkbox" onchange="app.onTextChange()"></input>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Active resolution:</td>
|
|
<td id="videoResDebug"></td>
|
|
<td>
|
|
<button onclick="app.requestFullscreen();">Go fullscreen</button>
|
|
</td>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<div>
|
|
<video id="video" poster="assets/poster.jpg"
|
|
width="600" height="400"
|
|
crossorigin="anonymous"
|
|
autoplay controls></video>
|
|
</div>
|
|
</body>
|
|
</html>
|