-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove cast button video pause #6293
Comments
You are welcome to submit a PR for this, but the shaka.cast APIs are slated for removal in v5.0.0. We will be moving away from custom messaging between sender and receiver and moving cast functionality out of shaka.cast and into the UI. |
Since the API is going to be removed I just ended up creating a monkey-patch that resumes the video after the cast button is pressed, I'm going to leave it here in case anyone needs it. //resume video after pausing for casting
const originalCastFunction = shaka.cast.CastProxy.prototype.cast;
const modifiedCastFunction = async function () {
originalCastFunction.bind(this)();
ui.getControls().getLocalVideo().play();
};
shaka.cast.CastProxy.prototype.cast = modifiedCastFunction; I call it after |
…lished (#6359) CastProxy's getInitState_() pauses the local video as part of a transfer of state to the receiver. Calling getInitState_() (via CastSender's onInitStateRequired_()) should be deferred until we establish a connection. This keeps the local video from pausing during a connection attempt. Closes #6293
…lished (#6359) CastProxy's getInitState_() pauses the local video as part of a transfer of state to the receiver. Calling getInitState_() (via CastSender's onInitStateRequired_()) should be deferred until we establish a connection. This keeps the local video from pausing during a connection attempt. Closes #6293
…lished (#6359) CastProxy's getInitState_() pauses the local video as part of a transfer of state to the receiver. Calling getInitState_() (via CastSender's onInitStateRequired_()) should be deferred until we establish a connection. This keeps the local video from pausing during a connection attempt. Closes #6293
…lished (#6359) CastProxy's getInitState_() pauses the local video as part of a transfer of state to the receiver. Calling getInitState_() (via CastSender's onInitStateRequired_()) should be deferred until we establish a connection. This keeps the local video from pausing during a connection attempt. Closes #6293
Have you read the FAQ and checked for duplicate open issues?
Yes
Is your feature request related to a problem? Please describe.
Whenever I press the cast button, the video always pauses. This does not happen in websites such as YouTube (which is the cast behaviour I'm seeking)
Describe the solution you'd like
I would like to have a flag or any other way of avoiding pausing the video when I click the cast button.
Describe alternatives you've considered
I though about monkey patching the library locally but it'd be much better to have a native option for this.
Additional context
The method
getInitState_()
insidecast_proxy.js
should be modified so that the video resumes playing afterthis.localVideo_.pause();
, or removing that line so the video never pauses.The text was updated successfully, but these errors were encountered: