File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -444,8 +444,9 @@ def public_clips():
444444 try :
445445 file_id = extract_drive_id (link )
446446 # Manually add extension to help with player detection
447- ext = '.mp4' if media_type == 'video' else '.mp3'
448- db_filename = f"https://drive.google.com/uc?export=download&id={ file_id } { ext } "
447+ #ext = '.mp4' if media_type == 'video' else '.mp3'
448+ db_filename = f"https://drive.google.com/file/d/{ file_id } /preview"
449+
449450 except Exception as e :
450451 message = f"Invalid Google Drive link. ({ e } )"
451452
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ <h3>Add a Clip from Google Drive</h3>
108108 < b > {{ title }}</ b > < br >
109109 < small > {{ description }}</ small > < br >
110110
111- {% if is_drive and 'mp4' in filename %}
112- < video controls width ="380 " style ="margin-top:0.7em; ">
111+ {% if is_drive %}
112+ < iframe src =" {{ filename }} " width ="380 " height =" 240 " allow =" autoplay " allowfullscreen style ="margin-top:0.7em; "> </ iframe >
113113 < source src ="{{ filename }} ">
114114 Your browser does not support the video tag.
115115 </ video >
You can’t perform that action at this time.
0 commit comments