“hujiajun” ab7739e41e 增加自动化脚本 2 months ago
..
Editor ab7739e41e 增加自动化脚本 2 months ago
Plugins ab7739e41e 增加自动化脚本 2 months ago
Runtime ab7739e41e 增加自动化脚本 2 months ago
Samples~ ab7739e41e 增加自动化脚本 2 months ago
UI ab7739e41e 增加自动化脚本 2 months ago
CHANGELOG.md ab7739e41e 增加自动化脚本 2 months ago
CHANGELOG.md.meta ab7739e41e 增加自动化脚本 2 months ago
Editor.meta ab7739e41e 增加自动化脚本 2 months ago
LICENSE.md ab7739e41e 增加自动化脚本 2 months ago
LICENSE.md.meta ab7739e41e 增加自动化脚本 2 months ago
Plugins.meta ab7739e41e 增加自动化脚本 2 months ago
README.md ab7739e41e 增加自动化脚本 2 months ago
README.md.meta ab7739e41e 增加自动化脚本 2 months ago
Runtime.meta ab7739e41e 增加自动化脚本 2 months ago
UI.meta ab7739e41e 增加自动化脚本 2 months ago
UnityVideoRenderTexture.renderTexture ab7739e41e 增加自动化脚本 2 months ago
UnityVideoRenderTexture.renderTexture.meta ab7739e41e 增加自动化脚本 2 months ago
package.json ab7739e41e 增加自动化脚本 2 months ago
package.json.meta ab7739e41e 增加自动化脚本 2 months ago

README.md

Unity Web Video Player

npm version

A video player plugin for Unity WebGL applications. Unity's builtin VideoPlayer can struggle to work with WebGL builds especially on mobile browsers. This package uses Web-native video elements to read the video source and exposes basic video controls to Unity. You can use video URLs either from StreamingAssets path or web servers (permissing CORS). While minimal, the plugin aims to be a complete video player for web across browsers and platforms. Key features include:

  • Start, Stop, Pause, Resume, (Un)Mute, APIs along with respective callback events.
  • Resampling of source video texture to preserve aspect ratio or arbitrarly stretch to match target texture size.
  • Fetch and set video player timestamps.
  • Supports both in-built and scriptable rendering pipeline.

Importing in Unity

To install this package in Unity you'll first have to add a new Scoped Registry. Head over to Edit>Project Settings>Package Manager and add the new registry details as follows -

Name: npmjs
URL: https://registry.npmjs.org
Scope(s): com.nfynt

After this head to Window>Package Manager and select My Registries under the Packages: options. This will list all the available package on npm, find Web Video Player and select the latest version available and hit install 🚀.

Project Demo

Issues

Submit issues on Github Repo with appropriate label as bug\enhancement\help wanted.

Authors

Shubham