You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
async function init(videoData) {
const player = new Shaka.player();
await player.attach(videoRef.current); //Stops execution here in the second initialization for the next episode
setPlayer(player);
//await player.load(videoData.src)
}
useEffect(() => {
//Player initialization code
init(videoData);
}, []);
const handleNext = () => {
if (player) {
player.destroy();
}
getNextEpisodeId().then((data) => init(data));
};
return (
<div>
<video ref={videoRef} autoplay />
<button onClick={handleNext}>Skip Next</button>
</div>
);
}`
I have written the code for playing next episode.
The player. attach method does not work the second time i am loading it for the get next episode ,it reachs till there and it stops execution when I am trying to load the second time
The text was updated successfully, but these errors were encountered:
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.
Have you read the Tutorials?
yes
Have you read the FAQ and checked for duplicate open issues?
yes
If the question is related to FairPlay, have you read the tutorial?
yes
What version of Shaka Player are you using?
4.7.12
What browser and OS are you using?
Ubuntu - Chrome and Firefox
Please ask your question
`function Shaka({ videoData, getNextEpisodeId = () => {} }) {
const videRef = useRef(null);
const [player, setPlayer] = useState(null);
}`
I have written the code for playing next episode.
The player. attach method does not work the second time i am loading it for the get next episode ,it reachs till there and it stops execution when I am trying to load the second time
The text was updated successfully, but these errors were encountered: