Skip to content

Commit

Permalink
Display poster image on playback error
Browse files Browse the repository at this point in the history
  • Loading branch information
SangwonOh committed May 18, 2023
1 parent 7d2b9ab commit aae2bfc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/ovenplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ovenplayer.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ovenplayer",
"version": "0.10.27",
"version": "0.10.28",
"description": "OvenPlayer is Open-Source HTML5 Player. OvenPlayer supports WebRTC Signaling from OvenMediaEngine for Sub-Second Latency Streaming.",
"main": "dist/ovenplayer.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions src/js/api/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ const Api = function (container) {
// }
// }

if (providerName === PROVIDER_WEBRTC) {
currentProvider.removeStream();
}

if (playerConfig.getConfig().autoFallback && that.getCurrentSource() + 1 < that.getSources().length) {

that.pause();
Expand Down
4 changes: 4 additions & 0 deletions src/js/api/provider/html5/providers/WebRTC.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ const WebRTC = function (element, playerConfig, adTagUrl) {

OvenPlayerConsole.log("WEBRTC PROVIDER LOADED.");

that.removeStream = () => {
element.srcObject = null;
};


that.destroy = () => {

Expand Down

0 comments on commit aae2bfc

Please sign in to comment.