Skip to content

Commit

Permalink
fix(player): Deactivated Levels by default; added new source for pl…
Browse files Browse the repository at this point in the history
…aylist
  • Loading branch information
rafa8626 committed Oct 26, 2019
1 parent 729fd7d commit b7de69c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ In addition to the list above, [HLS events](https://github.com/video-dev/hls.js/
4. [Playing HLS streaming](https://codepen.io/rafa8626/pen/QZWEVy)
5. [M(PEG)-DASH with Ads](https://codepen.io/rafa8626/pen/Xxjmra)
6. [Using `Levels`](https://codepen.io/rafa8626/pen/ExxXvZx)
7. [Basic playlist (video and audio)](https://codepen.io/rafa8626/pen/GRREQpX)

## Built With

Expand Down
4 changes: 2 additions & 2 deletions dist/openplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ var Player = function () {
controls: {
left: ['play', 'time', 'volume'],
middle: ['progress'],
right: ['levels', 'captions', 'settings', 'fullscreen']
right: ['captions', 'settings', 'fullscreen']
},
detachMenus: false,
hidePlayBtnTimer: 350,
Expand Down Expand Up @@ -1557,7 +1557,7 @@ var Player = function () {
}, {
key: "play",
value: function play() {
if (!this.media.loaded) {
if (this.media && !this.media.loaded) {
this.media.load();
this.media.loaded = true;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/openplayer.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class Player {
controls: {
left: ['play', 'time', 'volume'],
middle: ['progress'],
right: ['levels', 'captions', 'settings', 'fullscreen'],
right: ['captions', 'settings', 'fullscreen'],
},
detachMenus: false,
hidePlayBtnTimer: 350,
Expand Down Expand Up @@ -345,7 +345,7 @@ class Player {
* @memberof Player
*/
public play(): void {
if (!this.media.loaded) {
if (this.media && !this.media.loaded) {
this.media.load();
this.media.loaded = true;
}
Expand Down

0 comments on commit b7de69c

Please sign in to comment.