@@ -23,22 +23,9 @@ public class HISPlayeriOSDownloaderSample : HISPlayerManager
2323{
2424 protected override void EventOnDownloadCompleted (HISPlayerEventInfo eventInfo )
2525 {
26- // 1. Prepare the StreamProperties to be added
27- StreamProperties stream = new StreamProperties ();
28- stream .renderMode = HISPlayerRenderMode .RawImage ;
29- stream .rawImage = rawImage1 ;
30- stream .autoPlay = true ;
31-
32- // 2. Add prepared stream
33- AddStream (stream );
34-
35- // 3. Add the downloaded video content to the stream. eventInfo.stringInfo corresponds to
36- // the relative path to the Application.PersistentDataPath. You can save this value to
37- // open the content at any point after this event has been triggered
38- AddVideoContent (totalScreens , eventInfo .stringInfo );
39- totalScreens ++ ;
40-
41- base .EventOnDownloadCompleted (eventInfo );
26+ // Change Downloading Stream text
27+ if (eventInfo .stringInfo == " MyStreamTitle" )
28+ Debug .Log (" Downloading Stream: " + eventInfo .param1 + " %. Stream Title: " + eventInfo .stringInfo + " ." );
4229 }
4330}
4431```
@@ -55,10 +42,22 @@ public class HISPlayeriOSDownloaderSample : HISPlayerManager
5542{
5643 protected override void EventOnDownloadProgress (HISPlayerEventInfo eventInfo )
5744 {
58- // Change Downloading Stream text
59- if (eventInfo .stringInfo == " MyStreamTitle" )
60- Debug .Log (" Downloading Stream: " + eventInfo .param1 + " %. Stream Title: " + eventInfo .stringInfo + " ." );
45+ // 1. Prepare the StreamProperties to be added
46+ StreamProperties stream = new StreamProperties ();
47+ stream .renderMode = HISPlayerRenderMode .RawImage ;
48+ stream .rawImage = rawImage1 ;
49+ stream .autoPlay = true ;
50+
51+ // 2. Add prepared stream
52+ AddStream (stream );
6153
54+ // 3. Add the downloaded video content to the stream. eventInfo.stringInfo corresponds to
55+ // the relative path to the Application.PersistentDataPath. You can save this value to
56+ // open the content at any point after this event has been triggered
57+ AddVideoContent (totalScreens , eventInfo .stringInfo );
58+ totalScreens ++ ;
59+
60+ base .EventOnDownloadCompleted (eventInfo );
6261 }
6362}
6463```
0 commit comments