Hi.
Just a brief query
On my html page, I've placed a video element, which is working and plays mp4's.
May I please ask/enquire, each time the video plays, is there anyway of counting the number of times it is played and write this to a database?
Something like a counter, counting how many times the video is clicked/viewed/played?
At present, I've loaded a number of videos into any array, then played back the array in an html page.
Any suggestions would be welcomed.
Thank You.
Just a brief query
On my html page, I've placed a video element, which is working and plays mp4's.
May I please ask/enquire, each time the video plays, is there anyway of counting the number of times it is played and write this to a database?
Something like a counter, counting how many times the video is clicked/viewed/played?
At present, I've loaded a number of videos into any array, then played back the array in an html page.
Code:
<?
for ($count=0; $count<$new_max; $count++) {?>
<div class="col-lg-3 col-sm-6">
<div class="single_new_arrive">
<div class="sna_img">
<!--<img loading="lazy" class="prd_img" src="/library/videos/<?=$new_video[$count]?>" alt="product" /> -->
<!-- $new_videoid[$new_max] = openssl_encrypt($row['video_id'], $ciphering, $encryption_key, $options, $encryption_iv); -->
<video width="240" height="220" controls>
<source src="library/videos/<?= $new_video[$count]?>" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</div>
<div class="sna_content">
<a href="/modules/player/index.php?vid=<?=$new_videoid[$count]?>">
<h4><?=$new_title[$count]?></h4>
</a>
</div>
</div>
</div>
<?}?>
Any suggestions would be welcomed.
Thank You.