Skip to content

How to force play and not download the video #577

@SivopCi

Description

@SivopCi

Hi there,
I have a problem with fotorama video playback.
Indeed, I don't play youtube videos my videos on my server and when I click to play, it downloads the video...
Do you please have a solution for me?
The title mime of my video is a pm4 and here is my code:

`
<div class="fotorama" data-autoplay="true" data-nav="thumbs" data-transition="dissolve" data-loop="true">
<?php
$image = null;
$video = null;
$image_b = null;
$image_c = null;

	$image   = "images/produits/".$reference.".png";
	$video   = "images/produits/".$reference.".mp4";
	$image_b = "images/produits/".$reference."-b.png";
	$image_c = "images/produits/".$reference."-c.png";

	if(file_exists($image))   {echo '<img src="'.$image.'" class="img-fluid">';}
	if(file_exists($video))   {echo '<a href="'.$video.'" data-video="true"><img src="'.$image.'"></a>';}
	if(file_exists($image_b)) {echo '<img src="'.$image_b.'" class="img-fluid">';}
	if(file_exists($image_c)) {echo '<img src="'.$image_c.'" class="img-fluid">';}
	?>
	</div>

`

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions