File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,10 @@ class PlayerSetters: public PlayerEvents {
121
121
);
122
122
}
123
123
124
+ void setUserAgent (std::string userAgent) {
125
+ this ->instance .setUserAgent (" Dart VLC" , userAgent);
126
+ }
127
+
124
128
void add (Media* media) {
125
129
this ->isPlaylistModified = true ;
126
130
this ->state ->medias ->medias .emplace_back (media);
Original file line number Diff line number Diff line change @@ -274,6 +274,18 @@ class Player {
274
274
);
275
275
}
276
276
277
+ /// Sets user agent for dart_vlc player.
278
+ Future <void > setUserAgent (String userAgent) async {
279
+ await this ._isInstanceCreated.future;
280
+ await channel.invokeMethod (
281
+ 'Player.setUserAgent' ,
282
+ {
283
+ 'id' : this .id,
284
+ 'userAgent' : userAgent
285
+ },
286
+ );
287
+ }
288
+
277
289
/// Appends [Media] to the [Playlist] of the [Player] instance.
278
290
Future <void > add (Media source) async {
279
291
await this ._isInstanceCreated.future;
You can’t perform that action at this time.
0 commit comments