< Summary

Class:DCL.Components.Video.Plugin.WebGLVideoPlugin
Assembly:DCL.Components.Video
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Video/Plugins/WebGLVideoPlugin.cs
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:60
Line coverage:0% (0 of 16)
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%
WebVideoPlayerTextureGet(...)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);
 15        [DllImport("__Internal")]
 16        public static extern int WebVideoPlayerTextureGet(string id);
 17        [DllImport("__Internal")]
 18        public static extern void WebVideoPlayerPlay(string id, float startTime);
 19        [DllImport("__Internal")]
 20        public static extern void WebVideoPlayerPause(string id);
 21        [DllImport("__Internal")]
 22        public static extern void WebVideoPlayerVolume(string id, float volume);
 23        [DllImport("__Internal")]
 24        public static extern int WebVideoPlayerGetHeight(string id);
 25        [DllImport("__Internal")]
 26        public static extern int WebVideoPlayerGetWidth(string id);
 27        [DllImport("__Internal")]
 28        public static extern float WebVideoPlayerGetTime(string id);
 29        [DllImport("__Internal")]
 30        public static extern float WebVideoPlayerGetDuration(string id);
 31        [DllImport("__Internal")]
 32        public static extern int WebVideoPlayerGetState(string id);
 33        [DllImport("__Internal")]
 34        public static extern string WebVideoPlayerGetError(string id);
 35        [DllImport("__Internal")]
 36        public static extern void WebVideoPlayerSetTime(string id, float second);
 37        [DllImport("__Internal")]
 38        public static extern void WebVideoPlayerSetPlaybackRate(string id, float playbackRate);
 39        [DllImport("__Internal")]
 40        public static extern void WebVideoPlayerSetLoop(string id, bool loop);
 41#else
 042        public static void WebVideoPlayerCreate(string id, string url, bool useHls) { }
 043        public static void WebVideoPlayerRemove(string id) { }
 044        public static void WebVideoPlayerTextureUpdate(string id) { }
 045        public static int WebVideoPlayerTextureGet(string id) { return -1; }
 046        public static void WebVideoPlayerPlay(string id, float startTime) { }
 047        public static void WebVideoPlayerPause(string id) { }
 048        public static void WebVideoPlayerVolume(string id, float volume) { }
 049        public static int WebVideoPlayerGetHeight(string id) { return 0; }
 050        public static int WebVideoPlayerGetWidth(string id) { return 0; }
 051        public static float WebVideoPlayerGetTime(string id) { return 0; }
 052        public static float WebVideoPlayerGetDuration(string id) { return 0; }
 053        public static int WebVideoPlayerGetState(string id) { return (int)VideoState.ERROR; }
 054        public static string WebVideoPlayerGetError(string id) { return "WebVideoPlayer: Platform not supported"; }
 055        public static void WebVideoPlayerSetTime(string id, float second) { }
 056        public static void WebVideoPlayerSetPlaybackRate(string id, float playbackRate) { }
 057        public static void WebVideoPlayerSetLoop(string id, bool loop) { }
 58#endif
 59    }
 60}