You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hls-downloader.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,3 +86,55 @@ public class HISPlayeriOSDownloaderSample : HISPlayerManager
86
86
}
87
87
}
88
88
```
89
+
90
+
# Related API
91
+
92
+
### Event and Virtual Options
93
+
94
+
***public enum HISPlayerEvent**: The list of events provided by HISPlayer SDK for using HLS Downloader functionalities. The events can be used with the virtual functions in the next section:
Override this method to add custom logic when **HISPlayerEvent.HISPLAYER_EVENT_DOWNLOAD_COMPLETED** is triggered.
99
+
This event occurs whenever a stream that was being downloaded has ended the download process, and it's ready to be played.
100
+
101
+
<table>
102
+
<tr>
103
+
<th>Name</th>
104
+
<th>Description</th>
105
+
</tr>
106
+
<tr>
107
+
<td>stringInfo</td>
108
+
<td>Relative path where the stream has been stored. This will equal to the title settled to the video. The path is relative to the Application.persistentDataPath,which in iOS corresponds to /var/mobile/Containers/Data/Application/<guid>/Documents. Save it for later plaback of such stream.</td>
Override this method to add custom logic when **HISPlayerEvent.HISPLAYER_EVENT_DOWNLOAD_PROGRESS** is triggered.
114
+
This event occurs whenever a HLS stream is being downloaded, to retrieve the progress of such download.
115
+
116
+
<table>
117
+
<tr>
118
+
<th>Name</th>
119
+
<th>Description</th>
120
+
</tr>
121
+
<tr>
122
+
<td>param1</td>
123
+
<td>The percentage of the download progress of a certain stream.</td>
124
+
</tr>
125
+
<tr>
126
+
<td>stringInfo</td>
127
+
<td>Title of the stream that is being downloaded. This title is settled by the user when calling the DownloadStream API.</td>
128
+
</tr>
129
+
</table>
130
+
131
+
### Non-virtual Functions
132
+
133
+
#### public void DownloadStream(string url, string videoTitle)
134
+
Download an HLS Stream. Stream will be automatically saved on the Application.PersisentDataPath (/var/mobile/Containers/Data/Appligation/<guid>/Documents). If 2 downloaded contents have the same video title, the last one will overrite the first one. Avoid using non english characters, dots, slashes and any other kind of special character. The **url** refers to the URL to the HLS stream. **videoTitle** is the name of the saved stream and will allow to reproduce it once it has been downloaded.
135
+
136
+
#### public void DeleteDownloadStream(string videoTitle)
137
+
Delete a specific downloaded HLS Stream. **videoTitle** is the name of the stream that will be deleted from the device.
138
+
139
+
#### public void DeleteAllDownloadedStreams()
140
+
Delete all downloaded streams that have been stored in the Application.PersistentDataPath.
0 commit comments