|
@@ -21,11 +21,13 @@ public class TemplateVideo : BaseTemPlate
|
|
|
|
|
|
private void OnDisable()
|
|
|
{
|
|
|
- if(temQueue.Count>0)
|
|
|
+ Debug.Log("HJJ 停止播放");
|
|
|
+ m_Video.Stop();
|
|
|
+ if (temQueue.Count>0)
|
|
|
temQueue = new Queue<TemplateVideo>();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
protected override void OnEnable()
|
|
|
{
|
|
@@ -41,13 +43,7 @@ public class TemplateVideo : BaseTemPlate
|
|
|
|
|
|
m_Video.SetUrl(localSavePath);
|
|
|
|
|
|
- if (autoplay)
|
|
|
- {
|
|
|
- temQueue.Enqueue(this);
|
|
|
-
|
|
|
-
|
|
|
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
else
|
|
@@ -56,7 +52,19 @@ public class TemplateVideo : BaseTemPlate
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (autoplay)
|
|
|
+ {
|
|
|
+ Debug.Log("HJJ 开始自动播放" + localSavePath);
|
|
|
+ temQueue.Enqueue(this);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ Debug.Log("HJJ 不需要自動播放" + localSavePath);
|
|
|
+ }
|
|
|
setScale = true;
|
|
|
}
|
|
|
|