- Home /
Question by
BerengerVolumiq · Jan 09, 2019 at 04:51 PM ·
videovideos
Videoplayer plays same clip when url is modified
I'm using the videoplayer in a canvas. I change the url with a code that looks like that :
if (player.isPlaying)
player.Stop();
player.gameObject.SetActive(false);
player.clip = null;
player.source = VideoSource.Url;
player.url = newUrl;
player.gameObject.SetActive(true);
player.Play();
Here is the component
and it works fine in editor but not once built in webgl. Any idea what is going on ?
I'm using Unity 2018.2.15f1
screenshot.jpg
(37.9 kB)
Comment
Answer by BerengerVolumiq · Jan 09, 2019 at 06:21 PM
If anyone is interested, it seems that destroying the component and adding it back does the trick. Just have to make sure to restore all the variables.
Your answer
![](https://koobas.hobune.stream/wayback/20220612185434im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
VideoPlayer freezes on loop 1 Answer
Import Video Codec H.264 MP4 from Premiere 6 Answers
Does Unity 2018 support H.265 HEVC video? 0 Answers
Video Player stuck on first frame 1 Answer
Play High Quality Video in Unity 2 Answers