Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video not playing from local html file #139

Open
josephntiotangco opened this issue Jun 5, 2024 · 1 comment
Open

video not playing from local html file #139

josephntiotangco opened this issue Jun 5, 2024 · 1 comment

Comments

@josephntiotangco
Copy link

josephntiotangco commented Jun 5, 2024

video is not playing from opened html file with video tag and src from the same local directory. only white screen is displayed but works with images.

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:vlc="clr-namespace:LibVLCSharp.Avalonia;assembly=LibVLCSharp.Avalonia"
        xmlns:webview="clr-namespace:WebViewControl;assembly=WebViewControl.Avalonia"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="testAdsUI.MainWindow"
        WindowStartupLocation="Manual"
        Title="testAdsUI">
    <DockPanel Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
      <webview:WebView x:Name="webview" Address="{Binding CurrentAddress}"  />
    </DockPanel>
</Window>
<!DOCTYPE html> 
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="video-container">
<video 
src="4114185-hd_1920_1080_25fps.mp4"        
	  autoplay="true"
      muted="muted"
      width="100%"
      height="100%"
      style="object-fit: contain;" > 
</video>
</div>
</body>
</html> 
@joaompneves
Copy link
Collaborator

Probably the video is using some proprietary codecs (H.264 or H.265) which are not included by CEF (for licensing reasons). You might need to build CEF with those codecs support. Check this thread for more details: https://magpcss.org/ceforum/viewtopic.php?f=6&t=13515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants