< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Create(...)0%2100%
Remove(...)0%2100%
TextureUpdate(...)0%2100%
PrepareTexture(...)0%2100%
Play(...)0%2100%
Pause(...)0%2100%
SetVolume(...)0%2100%
GetHeight(...)0%2100%
GetWidth(...)0%2100%
GetTime(...)0%2100%
GetDuration(...)0%2100%
GetState(...)0%2100%
GetError(...)0%2100%
SetTime(...)0%2100%
SetPlaybackRate(...)0%2100%
SetLoop(...)0%2100%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Runtime.InteropServices;
 3using UnityEngine;
 4
 5namespace DCL.Components.Video.Plugin
 6{
 7    public class VideoPluginWrapper_WebGL : IVideoPluginWrapper
 8    {
 09        public void Create(string id, string url, bool useHls) { WebGLVideoPlugin.WebVideoPlayerCreate(id, url, useHls);
 010        public void Remove(string id) { WebGLVideoPlugin.WebVideoPlayerRemove(id); }
 011        public void TextureUpdate(string id) { WebGLVideoPlugin.WebVideoPlayerTextureUpdate(id); }
 12
 13        public Texture2D PrepareTexture(string id)
 14        {
 015            Texture2D texture = new Texture2D(1, 1);
 016            texture.UpdateExternalTexture((IntPtr)WebGLVideoPlugin.WebVideoPlayerTextureGet(id));
 017            texture.Apply();
 018            return texture;
 19        }
 20
 021        public void Play(string id, float startTime) { WebGLVideoPlugin.WebVideoPlayerPlay(id, startTime); }
 022        public void Pause(string id) { WebGLVideoPlugin.WebVideoPlayerPause(id); }
 023        public void SetVolume(string id, float volume) { WebGLVideoPlugin.WebVideoPlayerVolume(id, volume); }
 024        public int GetHeight(string id) { return WebGLVideoPlugin.WebVideoPlayerGetHeight(id); }
 025        public int GetWidth(string id) { return WebGLVideoPlugin.WebVideoPlayerGetWidth(id); }
 026        public float GetTime(string id) { return WebGLVideoPlugin.WebVideoPlayerGetTime(id); }
 027        public float GetDuration(string id) { return WebGLVideoPlugin.WebVideoPlayerGetDuration(id); }
 028        public VideoState GetState(string id) { return (VideoState)WebGLVideoPlugin.WebVideoPlayerGetState(id); }
 029        public string GetError(string id) { return WebGLVideoPlugin.WebVideoPlayerGetError(id); }
 030        public void SetTime(string id, float second) { WebGLVideoPlugin.WebVideoPlayerSetTime(id, second); }
 031        public void SetPlaybackRate(string id, float playbackRate) { WebGLVideoPlugin.WebVideoPlayerSetPlaybackRate(id, 
 032        public void SetLoop(string id, bool loop) { WebGLVideoPlugin.WebVideoPlayerSetLoop(id, loop); }
 33    }
 34}