Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

simple webglmovie texture doesn't loop…

Discussion in 'Web' started by Zed8, May 2, 2017.

  1. Zed8

    Zed8

    Joined:
    Mar 24, 2017
    Posts:
    13
    Hi everybody
    first, excuse me for my bad english.
    using the simple webglmovie texture downloaded on the assets store.
    It works fine but I can't looping my videos. depending on the size of my videos, it's playing one or a few times and then stop. I did not modify the original script("videotest") at all. Is my video too big ? what did I do wrong ?

    also could someone explain me how to correct :
    "Assets/Plugins/WebGLMovieTexture.cs(105,49): warning CS0618: `UnityEngine.Texture.GetNativeTextureID()' is obsolete: `Use GetNativeTexturePtr instead."

    I did not find anything about it on this forum and on web. please help me :)
     
  2. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    which exact unity version are you using?
     
  3. Zed8

    Zed8

    Joined:
    Mar 24, 2017
    Posts:
    13
    Hi,
    I'm using Unity 5.6.
    It's working now if I'm using Development Builder. Thanks

    I did not fund answers for my second question :)
     
  4. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    So you have WebGLMovieTexture working in WebGL in a browser using Unity 5.6.0.f3?

    It doesnt work for me, only 5.4 does.
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    What's the problem with WebGLMovieTexture in 5.6?

    Have you tried the new VideoPlayer instead?
     
  6. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Hello Marco,

    Yes I have tried the 5.6 VideoPlayer, in WebGL it only works if I give it a URL that has the type of file embedded in the URL.

    For example,if i give it a url like this "http://www.mysite.com/bird.mp4" it will play it fine because the URL contains the string "mp4"

    But if i give it a URL like this "http://www.mysite.com?file=1", then it doesnt work, meaning it doesnt even try to access that website, it totally ignores it. When the request is made to mysite, the server checks the file number in the request, then it streams back the corresponding mp4.file data, but the 5.6 movie player doesnt even try to load from the website if the "mp4" is not in the url. its totally ignored and doesnt even try to play it.

    I tried faking the mp4 by sending the VideoPlayer a URL like this http://www.mysite.com?file=1&type=mp4" in this case the VideoPlayer accesses the server, and the server starts streaming the mp4 file, but then the VideoPlayer gives a different error immediately after it starts playing, something about the media type changing during the stream (of course it didnt change, the same thing works in the editor), then it stops playing.

    Like I said this only happens in the browser, the same code works in the editor, where its accessing the same server, and the same mp4 file.

    I submitted it as a bug but the bug disappeared from the site somehow.

    I already mentioned this bug in this thread

    https://forum.unity3d.com/threads/big-bug-in-5-6-videoplayer.469153/

    At the link above you can see DominiqueLrx said it was fixed in a later release after 5.6, i asked him for that release in a private message but i never got a response.

    Do you think you could get that release where that bug was fixed for me, i really need it because im stuck on version 5.4 right now.

    Thanks