[英]LibVLCSharp MediaInput - buffer to small too hold all readed file inside
[英]Hide all LibVLCSharp elements
我正在開發一個具有實時視頻的應用程序,我設法實現了 LibVLCSharp ,但是我有一個問題,我需要從屏幕上刪除所有內容,這只是缺少:
這是我的代碼:
XAML
<shared:MediaPlayerElement
x:Name="MediaPlayerElementPlayer"
EnableRendererDiscovery="True"
HorizontalOptions="FillAndExpand"
LibVLC="{Binding LibVLC}"
MediaPlayer="{Binding MediaPlayer}"
VerticalOptions="Start">
<shared:MediaPlayerElement.PlaybackControls>
<shared:PlaybackControls
IsAspectRatioButtonVisible="False"
IsAudioTracksSelectionButtonVisible="False"
IsCastButtonVisible="False"
IsClosedCaptionsSelectionButtonVisible="False"
IsPlayPauseButtonVisible="False"
IsRewindButtonVisible="False"
IsSeekBarVisible="False"
IsSeekButtonVisible="False"
IsSeekEnabled="False"
IsStopButtonVisible="False"
KeepScreenOn="False"
MainColor="{StaticResource Cor8}"
ShowAndHideAutomatically="True" />
</shared:MediaPlayerElement.PlaybackControls>
</shared:MediaPlayerElement>
C#
private void ConstruirLibVLC()
{
Core.Initialize();
Contexto.LibVLC = new LibVLC(enableDebugLogs: true);
Media media = new Media(Contexto.LibVLC, new Uri(TransmissaoAoVivoHelper.UrlTransmissaoAoVivo));
Contexto.MediaPlayer = new MediaPlayer(media)
{
EnableHardwareDecoding = true,
};
media.Dispose();
Contexto.MediaPlayer.Play();
}
不明白你的意思。 如果您只想擁有視頻播放器,為什么不使用 VideoView 元素而不是 MediaPlayerElement (這是一個已經嵌入常用控件的視圖,如按鈕、搜索欄......)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.