Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
修复在进入直播时没有应用默认播放模式的问题 (#1535)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy authored Oct 21, 2022
1 parent 480c407 commit f8d0a69
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,15 @@ public void SetSnapshot(PlaySnapshot snapshot)
{
_presetRoomId = snapshot.VideoId;
var defaultPlayMode = _settingsToolkit.ReadLocalSetting(SettingNames.DefaultPlayerDisplayMode, PlayerDisplayMode.Default);
MediaPlayerViewModel.DisplayMode = snapshot.DisplayMode ?? defaultPlayMode;
ReloadCommand.ExecuteAsync(null);
ReloadCommand.ExecuteAsync(null)
.ContinueWith(async _ =>
{
await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
MediaPlayerViewModel.DisplayMode = snapshot.DisplayMode ?? defaultPlayMode;
});
});

_liveProvider.MessageReceived += OnMessageReceivedAsync;
}

Expand Down

0 comments on commit f8d0a69

Please sign in to comment.