-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make autoplay configurable, add archive folder #10
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -545,4 +545,31 @@ RmpVast.prototype.loadAds = function (vastUrl, isUrl = true) { | |
isUrl ? _makeAjaxRequest.call(this, vastUrl) : _parseXml.call(this, vastUrl); | ||
}; | ||
|
||
RmpVast.prototype.pnVideoPlay = function () { | ||
this.manualPlay = true; | ||
|
||
if (DEBUG) { | ||
FW.log('---- pnVideoPlay called'); | ||
FW.log('this.vastPlayer.readyState - ' + this.vastPlayer.readyState); | ||
FW.log('this.contentPlayer.readyState - ' + this.contentPlayer.readyState); | ||
} | ||
|
||
if (this.vastPlayer.readyState > 3 || this.contentPlayer.readyState > 3) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
this.play(); | ||
} else { | ||
this.vastPlayer.addEventListener('canplaythrough', () => { | ||
if (DEBUG) { | ||
FW.log('---- canplaythrough fired for vastPlayer, readyState - ' + this.vastPlayer.readyState); | ||
} | ||
this.play(); | ||
}); | ||
this.contentPlayer.addEventListener('canplaythrough', () => { | ||
if (DEBUG) { | ||
FW.log('---- canplaythrough fired for contentPlayer, readyState - ' + this.contentPlayer.readyState); | ||
} | ||
this.play(); | ||
}); | ||
} | ||
}; | ||
|
||
export default RmpVast; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can either player be undefined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@solitaa what about this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested few scenarios, like when vast is broken or video is unavailable, rmp works fine and no issue with players, but I agree that it will be more accurate to add checks.