RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
224 stars 27 forks source link

Replace Pointer_stringify(ptrToSomeCString) with UTF8ToString(ptrToSomeCString) in WebGL Plugin #1862

Closed kartik-scholarlab closed 1 month ago

kartik-scholarlab commented 1 month ago

When Building WebGL using Unity 2022.3.21f it gives error and does not play video. The exact error is as follows : The JavaScript function 'Pointer_stringify(ptrToSomeCString)' is obsoleted and will be removed in a future Unity version. Please call 'UTF8ToString(ptrToSomeCString)' instead.

Your Setup (please complete the following information):

To Reproduce

  1. Add video
  2. Build for WebGL
  3. Try playing the video in browser
kartik-scholarlab commented 1 month ago

The purpose of reporting this issue is to help fellows who are facing similar problem. Here is how i resolved the issue.

  1. Go to AVProvideo > Plugins > WebGL
  2. You will find "AVProVideo.jslib", open that file.
  3. In line number 69, it is line number 69 - I haven't modified anything. You will find "Pointer_stringify" just replace it with "UTF8ToString". Save the file and build the project again.

The above should resolve your problem.