资源简介
VLC Player for Unity插件使用测试工程,讲解脚本控制RTSP视频的播放
代码片段和文件信息
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class VideoPlayTest : MonoBehaviour {
public Gameobject videoOnPanel = null;
public Text texBtnPlay = null;
private PlayVLC vlcPlayer = null;
private bool videoShow = false;
//当前后台打开的VLC视频播放进程在关闭时会有一点延迟,必须确保完全退出,才能进行下一次的重新开启
private bool videoWaitExit = false;
// Use this for initialization
void Start () {
vlcPlayer = videoOnPanel.GetComponent();
vlcPlayer.VideoPath = “rtsp://192.168.11.136:554“;
}
// Update is called once per frame
void Update () {
CheckVlcPlayerState();
}
void OnApplicationQuit()
{
if (videoWaitExit) return;
if (videoShow)
{
vlcPlayer.StopVideo();
}
}
public void PlayVideo()
{
if (videoWaitExit) return;
if (videoShow)
{
vlcPlayer.StopVideo();
videoWaitExit = true;
texBtnPlay.text = “打开视频“;
}
else
{
videoOnPanel.SetActive(true);
vlcPlayer.Play();
texBtnPlay.text = “关闭视频“;
}
videoShow = !videoShow;
}
///
/// 检查当前打开的VLC进程是否完全关闭
///
private void CheckVlcPlayerState()
{
if (false == videoWaitExit) return;
if (false == vlcPlayer.IsPlaying)
{
videoOnPanel.SetActive(false);
videoWaitExit = false;
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 448512 2016-08-13 15:37 VideoPlayTestProject\Assets\Plugins\System.Drawing.dll
文件 394 2016-08-13 15:37 VideoPlayTestProject\Assets\Plugins\System.Drawing.dll.me
文件 3053568 2016-08-13 15:36 VideoPlayTestProject\Assets\Plugins\System.Windows.Forms.dll
文件 394 2016-08-13 15:36 VideoPlayTestProject\Assets\Plugins\System.Windows.Forms.dll.me
文件 193 2016-08-13 15:38 VideoPlayTestProject\Assets\Plugins.me
文件 17578 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\AUTHORS.txt
文件 176 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\AUTHORS.txt.me
文件 944659 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\axvlc.dll
文件 294 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\axvlc.dll.manifest
文件 176 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\axvlc.dll.manifest.me
文件 176 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\axvlc.dll.me
文件 18431 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\COPYING.txt
文件 176 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\COPYING.txt.me
文件 79379 2016-08-13 15:37 VideoPlayTestProject\Assets\StreamingAssets\vlc\libgcc_s_seh-1.dll
文件 176 2016-08-13 15:37 VideoPlayTestProject\Assets\StreamingAssets\vlc\libgcc_s_seh-1.dll.me
文件 143891 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\libvlc.dll
文件 176 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\libvlc.dll.me
文件 2750483 2016-08-13 15:35 VideoPlayTestProject\Assets\StreamingAssets\vlc\libvlccore.dll
文件 176 2016-08-13 15:35 VideoPlayTestProject\Assets\StreamingAssets\vlc\libvlccore.dll.me
文件 80345 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\extensions\VLSub.luac
文件 176 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\extensions\VLSub.luac.me
文件 193 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\extensions.me
文件 3817 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\main.css
文件 176 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\main.css.me
文件 2732 2016-08-13 15:37 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\mobile.css
文件 176 2016-08-13 15:37 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\mobile.css.me
文件 201 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\ui-lightness\images\ui-bg_diagonals-thick_18_b81900_40x40.png
文件 176 2016-08-13 15:36 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\ui-lightness\images\ui-bg_diagonals-thick_18_b81900_40x40.png.me
文件 197 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\ui-lightness\images\ui-bg_diagonals-thick_20_666666_40x40.png
文件 176 2016-08-13 15:38 VideoPlayTestProject\Assets\StreamingAssets\vlc\lua\http\css\ui-lightness\images\ui-bg_diagonals-thick_20_666666_40x40.png.me
............此处省略2549个文件信息
- 上一篇:安川机器人操作手册
- 下一篇:STM32F4开发指南-寄存器版本_V1.1
相关资源
- modelsim-gcc-4.5.0-mingw64for 64位windows
- RedisDesktopManager 2020.6 for Windows
- Reinforcement Learning with Tensorflow 无水印
- H3C iNode PC 7.3 (E0528),最新版for wi
- Prolog Programming for Artificial Intelligence
-
HUPla
yer(Windows&安卓&苹果MAC) - Data-driven Graphic Design Creative Coding for
- MicrostripFiltersforRFMicrowaveApplications第二
- 苹果鼠标for win10驱动
- vim for windows 32位和64位的都有
- 数字笔记珍宝(GemforOneNote2013)v40.1
- VC_redist.x64for2017、2019.rar
- google plugin for eclipse (eclipse的gwt插件
- Approximation.Algorithms.for.NP-Hard.Problems
- 彭国伦《Fortran95程序设计 》电子书
- vuforia-unity-5-0-10.unitypackage
- KineticWing for window 支持qss编辑 支持自
- Prism for .NET 4.0
- Informatica详细安装操作手册
- EhLib 7.0.133 Full Source for D7-XE7〖含源码
- R语言数据科学(r for data science 中文版
- 2018年最新版 1800-2017 - IEEE Standard f
- LabelImg for Mac
- NVIDIA GeForce GTX 全系列显卡超频程序
- Identity and Data Security for Web Development
- David Silver的强化学习Reinforcement Learn
- Unreal Engine 4 for Design Visualization azw3
- Cross-Platform Desktop Applications Using Node
- Practical Statistics for Data Scientists 50 Es
- Data Mining for Business Analytics Concepts Te
评论
共有 条评论