< Summary

Class:DCL.Components.Video.Plugin.WebGLVideoPlugin
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Video/Plugins/WebGLVideoPlugin.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:57
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
WebVideoPlayerCreate(...)0%2100%
WebVideoPlayerRemove(...)0%2100%
WebVideoPlayerTextureUpdate(...)0%2100%
WebVideoPlayerPlay(...)0%2100%
WebVideoPlayerPause(...)0%2100%
WebVideoPlayerVolume(...)0%2100%
WebVideoPlayerGetHeight(...)0%2100%
WebVideoPlayerGetWidth(...)0%2100%
WebVideoPlayerGetTime(...)0%2100%
WebVideoPlayerGetDuration(...)0%2100%
WebVideoPlayerGetState(...)0%2100%
WebVideoPlayerGetError(...)0%2100%
WebVideoPlayerSetTime(...)0%2100%
WebVideoPlayerSetPlaybackRate(...)0%2100%
WebVideoPlayerSetLoop(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Video/Plugins/WebGLVideoPlugin.cs

#LineLine coverage
 1using System;
 2using System.Runtime.InteropServices;
 3
 4namespace DCL.Components.Video.Plugin
 5{
 6    public static class WebGLVideoPlugin
 7    {
 8#if UNITY_WEBGL && !UNITY_EDITOR
 9        [DllImport("__Internal")]
 10        public static extern void WebVideoPlayerCreate(string id, string url, bool useHls);
 11        [DllImport("__Internal")]
 12        public static extern void WebVideoPlayerRemove(string id);
 13        [DllImport("__Internal")]
 14        public static extern void WebVideoPlayerTextureUpdate(string id, IntPtr texturePtr, bool isWebGL1);
 15        [DllImport("__Internal")]
 16        public static extern void WebVideoPlayerPlay(string id, float startTime);
 17        [DllImport("__Internal")]
 18        public static extern void WebVideoPlayerPause(string id);
 19        [DllImport("__Internal")]
 20        public static extern void WebVideoPlayerVolume(string id, float volume);
 21        [DllImport("__Internal")]
 22        public static extern int WebVideoPlayerGetHeight(string id);
 23        [DllImport("__Internal")]
 24        public static extern int WebVideoPlayerGetWidth(string id);
 25        [DllImport("__Internal")]
 26        public static extern float WebVideoPlayerGetTime(string id);
 27        [DllImport("__Internal")]
 28        public static extern float WebVideoPlayerGetDuration(string id);
 29        [DllImport("__Internal")]
 30        public static extern int WebVideoPlayerGetState(string id);
 31        [DllImport("__Internal")]
 32        public static extern string WebVideoPlayerGetError(string id);
 33        [DllImport("__Internal")]
 34        public static extern void WebVideoPlayerSetTime(string id, float second);
 35        [DllImport("__Internal")]
 36        public static extern void WebVideoPlayerSetPlaybackRate(string id, float playbackRate);
 37        [DllImport("__Internal")]
 38        public static extern void WebVideoPlayerSetLoop(string id, bool loop);
 39#else
 040        public static void WebVideoPlayerCreate(string id, string url, bool useHls) { }
 041        public static void WebVideoPlayerRemove(string id) { }
 042        public static void WebVideoPlayerTextureUpdate(string id, IntPtr texturePtr, bool isWebGL1) { }
 043        public static void WebVideoPlayerPlay(string id, float startTime) { }
 044        public static void WebVideoPlayerPause(string id) { }
 045        public static void WebVideoPlayerVolume(string id, float volume) { }
 046        public static int WebVideoPlayerGetHeight(string id) { return 0; }
 047        public static int WebVideoPlayerGetWidth(string id) { return 0; }
 048        public static float WebVideoPlayerGetTime(string id) { return 0; }
 049        public static float WebVideoPlayerGetDuration(string id) { return 0; }
 050        public static int WebVideoPlayerGetState(string id) { return (int)VideoState.ERROR; }
 051        public static string WebVideoPlayerGetError(string id) { return "WebVideoPlayer: Platform not supported"; }
 052        public static void WebVideoPlayerSetTime(string id, float second) { }
 053        public static void WebVideoPlayerSetPlaybackRate(string id, float playbackRate) { }
 054        public static void WebVideoPlayerSetLoop(string id, bool loop) { }
 55#endif
 56    }
 57}