Video Player WebGL
Marks
$100.00
$120.00
17%OFF
Date |
Price |
---|---|
Date |
Price($) |
04/02(2021) |
60.0 |
07/07(2021) |
70.0 |
07/28(2021) |
100.0 |
02/01(2022) |
143.0 |
07/14(2022) |
152.0 |
01/18(2024) |
120.0 |
03/04(2024) |
100.0 |
10/12(2024) |
100.0 |
Jump AssetStore
This asset was made to play videos in WebGL builds. It even works on Safari and it's easy to use.It works with any pipeline, but the example scene was made with the built-in one. It works with Unity 2019 or higher, and requires the NaughtyAttributes free asset.This asset works in a similar fashion as the official VideoPlayer component, but for WebGL only. If you are having issues playing videos with the standard video player on Safari or other browser(s), you came to the right place!HIGHLIGHTSPlay videos with spatial audio, especially useful for VR!Play m3u8 live stream videos!Play videos with transparency!20 events available, official video player only supports 8.On par with Unity's video player speed, and in many circumstances, it is faster and plays smoothly while the official player lags.Supports playing videos locally or from external URL, including any kind of Blob URL, URLs created with createObjectURL in general, and DataURL!Check out the technical details!TRY IT! (changing volume on mobile Safari doesn't work). You can check the docs here.MY OTHER PLUGINSWant to capture webgl gameplay? Check out my new asset RecorderWebGL.Want to access geolocation on the web? Check out GeolocationWebGL.Want to access your webcam without hurdles? Check out DeviceCameraWebGL.Want to use gyroscope on the web? Check GyroscopeAccelerometerWebGL.Want to download/share videos, images, etc? Check out ShareNSaveWebGL.Want to vibrate your phone on the web? Check out VibrationWebGL.Want to use the calendar on the web? Check out CalendarEventWebGL.Want to upload files into Unity? Check out File Browser WebGL.Want to check when your web app paused? Check out OnPauseWebGL.Want to sign in with Google? Check out GSI Sign In WebGL.Want to make image AR experiences on the web? Check out Augmented Reality WebGL - Image Tracking WebAR.Want to make Face AR VTO experiences on the web? Check out Augmented Reality WebGL - Face Tracking Virtual Try On.Want to use SQL on the Web? Check out SQL WebGL.If you like my plugin, please consider leaving a review. It helps me immensely and encourages me to improve the plugin further, and other people to support my work :).What are the features?You can play, pause, stop, restart, seek, change the volume, the playback rate, mute, check the length, width, height, if it’s playing, if it’s paused, check the current time, check the buffer, check the network state, preserve pitch or not, check readiness state of video, check the time ranges the user can seek to.It supports all available video events for the web. There are 20 events available, the official Unity API only supports 8.You can easily configure everything through the inspector. You can also change anything later at runtime if you want to. For example, changing the source of the video to play multiple content using the same video instance.You can autoplay the video.You can play videos from the StreamingAssets folder(local) or from an external URL. Easily configurable through the inspector.It works on basically anything. You can play the video on a plane or a sphere for example. You can play the video on a raw image. My asset works by storing the video feed on a render texture, which you then use to create materials that you apply to your objects.It works on all major browsers: chrome, safari, firefox, edge, opera. Currently just not working on firefox for Android, because of a firefox bug.NEW IN 1.6 You can downmix to mono, and control the panning. Check out the compatibility table for these features. You can now create spatial audio for VR!NEW IN 1.73 HLS (.m3u8 files) support by integrating a third party library with my plugin. More info in the docs.NEW IN 1.8 Added a shader that allows one to play green screen videos, and a shadergraph that allows one to play side-by-side alpha masked videos. There are a few important remarks about the latter:1-If you use the built-in RP, it only works on Unity 2021.2 or higher. Otherwise, it requires you to use URP.2- You must prepare the video, so that one of the sides has the color channels, and the other side has the alpha channel only. As a consequence, the prepared video will have twice the width or height of the original video, and might need to be compressed.3- In the video preparation, it must be encoded as an h.264 mp4 file.EDITOR SUPPORTPlease note that it doesn't work in the editor, like any WebGL jslib plugin. Making it work in the editor would require using the default video player, which I don't recommend doing. It's a case of comparing apples to oranges. While having the video in the editor is convenient, it doesn't reflect the web environment, which can lead to unexpected behaviour. Don't do it.Any requirements?Install the NaughtyAttributes free asset first. It works on Unity 2019 or higher.Use mp4 files encoded with H.264 or MPEG-4 for cross-browser compatibility. At the time of writing, webm isn’t supported on Safari yet.If your video’s source is an external URL, it must be a direct link pointing to the video, that is, the URL must end with the file name. For example, this video. It works on videos stored in CDNs like AWS or CloudFlare for example. But it does not support playing videos from youtube because the URL from youtube videos are not direct links.