update latest
This commit is contained in:
1 parent
b38f1a93bb
commit
eb707c1ee1
7 files changed
+202
-22
No files matched your search
@@ -269,6 +269,26 @@
|
||||
<i class="bi bi-three-dots-vertical"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-dark yt-more-dropdown dropdown-menu-end">
|
||||
<li>
|
||||
<button class="yt-more-dropdown-item" onclick="addToQueue('{{ $video->id }}')">
|
||||
<i class="bi bi-list-nested"></i> Add to queue
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="yt-more-dropdown-item" onclick="saveToWatchLater('{{ $video->id }}')">
|
||||
<i class="bi bi-clock"></i> Save to Watch later
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="yt-more-dropdown-item" onclick="openPlaylistModal('{{ $video->id }}')">
|
||||
<i class="bi bi-bookmark"></i> Save to playlist
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<a class="yt-more-dropdown-item" href="{{ route('videos.download', $video->id) }}">
|
||||
<i class="bi bi-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
@if($video->isShareable())
|
||||
<li>
|
||||
<button class="yt-more-dropdown-item" onclick="openShareModal('{{ $video->share_url }}', '{{ addslashes($video->title) }}')">
|
||||
@@ -276,14 +296,21 @@
|
||||
</button>
|
||||
</li>
|
||||
@endif
|
||||
<li><a class="yt-more-dropdown-item" href="{{ route('videos.edit', $video->id) }}"><i class="bi bi-pencil"></i> Edit</a></li>
|
||||
<li><a class="yt-more-dropdown-item" href="{{ route('videos.show', $video->id) }}"><i class="bi bi-play"></i> Play</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li>
|
||||
<form action="{{ route('videos.destroy', $video->id) }}" method="POST" onsubmit="return confirm('Delete this video?');" class="m-0">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit" class="yt-more-dropdown-item text-danger"><i class="bi bi-trash"></i> Delete</button>
|
||||
</form>
|
||||
<button class="yt-more-dropdown-item" onclick="notInterested('{{ $video->id }}')">
|
||||
<i class="bi bi-dash-circle"></i> Not interested
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="yt-more-dropdown-item" onclick="dontRecommendChannel('{{ $video->user_id }}')">
|
||||
<i class="bi bi-x-circle"></i> Don't recommend channel
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="yt-more-dropdown-item" onclick="reportVideo('{{ $video->id }}')">
|
||||
<i class="bi bi-flag"></i> Report
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -187,8 +187,8 @@
|
||||
<!-- Video Section -->
|
||||
<div class="yt-video-section">
|
||||
<!-- Video Player -->
|
||||
<div class="video-container @if($video->orientation === 'portrait') portrait @elseif($video->orientation === 'square') square @elseif($video->orientation === 'ultrawide') ultrawide @endif">
|
||||
<video controls playsinline preload="metadata">
|
||||
<div class="video-container @if($video->orientation === 'portrait') portrait @elseif($video->orientation === 'square') square @elseif($video->orientation === 'ultrawide') ultrawide @endif" id="videoContainer">
|
||||
<video id="videoPlayer" controls playsinline preload="metadata">
|
||||
<source src="{{ route('videos.stream', $video->id) }}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
@@ -279,5 +279,30 @@
|
||||
</script>
|
||||
@endauth
|
||||
@endif
|
||||
|
||||
<script>
|
||||
// Auto-play video with sound when page loads
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var videoPlayer = document.getElementById('videoPlayer');
|
||||
if (videoPlayer) {
|
||||
// Try to autoplay with sound (works because user just clicked on the video)
|
||||
var playPromise = videoPlayer.play();
|
||||
|
||||
if (playPromise !== undefined) {
|
||||
playPromise.then(function() {
|
||||
// Autoplay started successfully
|
||||
console.log('Video autoplayed with sound');
|
||||
}).catch(function(error) {
|
||||
// Autoplay was prevented, try muted
|
||||
console.log('Autoplay blocked, attempting muted autoplay');
|
||||
videoPlayer.muted = true;
|
||||
videoPlayer.play().catch(function(e) {
|
||||
console.log('Muted autoplay also blocked');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in new issue
Block a user