-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #106. Change-Id: Ifdacd0f54c81052940ac00fa69c31cca322c415a
- Loading branch information
1 parent
cdb2934
commit ce77c47
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
Copyright 2015 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. | ||
--> | ||
|
||
<h3 class="tutorial-heading"> | ||
Player Errors vs Video Errors | ||
</h3> | ||
|
||
<p> | ||
Shaka Player dispatches 'error' events to the application. Although you may be | ||
used to listening for events on the video element, this is not recommended when | ||
using Shaka Player. There can be spurious events when unloading video sources, | ||
and Shaka Player will filter these out for you. In addition, Shaka Player will | ||
dispatch certain DASH-related or EME-related errors that you cannot receive any | ||
other way. | ||
</p> | ||
|
||
<pre class="prettyprint source"><code id="errors_sample1">var video = document.getElementById('video'); | ||
var player = new shaka.player.Player(video); | ||
|
||
// DO listen for errors from the Player. | ||
player.addEventListener('error', function(event) { /* ... */ }); | ||
|
||
// DO NOT listen for errors from the video element. | ||
//video.addEventListener('error', function(event) { /* ... */ }); | ||
</code></pre> | ||
|
||
<p> | ||
See also the list of events fired by {@link shaka.player.Player}. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var video = document.getElementById('video'); | ||
var player = new shaka.player.Player(video); | ||
|
||
// DO listen for errors from the Player. | ||
player.addEventListener('error', function(event) { /* ... */ }); | ||
|
||
// DO NOT listen for errors from the video element. | ||
//video.addEventListener('error', function(event) { /* ... */ }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters