Change default Video Player without Plugin

We all know there are various types of plugins to EMBED Video Players. My issue is, that I have a Theme, which links the Videos only with a link and not with some kinda Plugin. Is there any possible way to change the default Video Player Design hardcoded ? I didn't find a solution in the WWW.
Category: Web

Default subtitle for videos

How can I set the default subtitle in wordpress videos? Here is the shortcode that wp created after adding a video with a subtitle from media: [video width="960" height="540" mp4="example.com/wp-content/uploads/test.mp4" ]<track srclang="En" label="English" kind="subtitles" src="example.com/wp-content/uploads/test.vtt" />[/video] Now when I see the post in FO, I have to click on "cc" in video control bar and choose "English". The default is "None". Now how can I change this default to English so that the user doesn't have to choose subtitle?
Category: Web

How add class youtube and type/html to oembed code?

How can i add : class="youtube-player" type="text/html" to iframe like : function Oembed_youtube_no_title($html,$url,$args){ $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $id); if (isset($id['v'])) { return '<iframe class="youtube-player" type="text/html" src="https://www.youtube.com/embed/' .$id['v'].'?vq=large&autohide=1&autoplay=1&fs=1&hl=fr&rel=0&loop=1" frameborder="0" allowfullscreen></iframe>'; } return $html; }
Category: Web

possibility to control embedded video timeline with buttons and links external to the player

I am a designer working on a Wordpress website, currently, I need to make a page where there can be displayed an external video (can be from almost any URL) but I want to include some functionality that allows adding links in the text or buttons that actually makes the player go to a specific moment (something similar to Timestamp in youtube videos) in the timeline of the video. Currently, I am using the Elementor pro page builder to construct …
Category: Web

How to load mediaelement.js in theme template?

I'm developing a video oriented theme. I need to include native WordPress video player in my page template. This is what I'm doing: $video url comes from a custom field. It outputs the video file url http://example.com/video.mp4 do_shortcode() outputs the standard [video] shortcode used in posts/pages. $video = get_field( "video_file_url"); echo do_shortcode('[video src="'.$video.'"]'); This is what I'm getting: The control bar color is light (not dark as in the standard WP player) and there's not play button in the middle …
Category: Web

Embedding local video in Wordpress comments

I'm trying to embed a video file (from Media Library) in a comment. Adding the default code currently used in Posts didn't work: [video width="1280" height="718" mp4="https://www.example.com/wp-content/uploads/2021/10/video.mp4"][/video] Pasting the raw link in the comment dind't work either, and the output was in plain text: [video src="https://www.example.com/wp-content/uploads/2021/10/video.mp4" /] Is there a way to make Wordpress parse the comments in a way that I can use either the video shortcode or the raw link? I'm asking for help because I don't want …
Category: Web

Proceed to the next video of the custom post type but remain on the same post

So I have a custom post type in WordPress that displays html5 videos. Is there a way I could automatically play the next video once it's over and still remain on the same post? I'm thinking something like this would be the perfect example. Here's a link to what I have so far. I have a custom post type called nowthisearth_post and a custom field nowthisearth_media_url that is pulling in the link to the MP4 file. Right now there are …
Category: Web

How to make native video player full width?

This is what I have now: I want the video player to take up the whole horizontal space and stretch width 100%. The video should also stay responsive, filling the whole video player area. I fallowed advice in this answer and added this to my functions.php: if ( ! isset( $content_width ) ) { $content_width = 850; } The content width on my template is 850px. But setting the content width didn't help. How to make WordPress native video player …
Category: Web

How to disable 'enclosure' custom field link from appearing in the post

Seems like there is no way to delete the custom field 'enclosure' (if I delete it in a post, as soon as I press update it will appear again). OK, but how can I remove the link to the video file (my-vide.flv), which is added automatically in the post? (this custom field adds it when a video is present in the post) I have no code that would call this custom field. Can't find anything on the internet about this. …
Category: Web

How to prevent users to download videos from lms website?

I want to develop a wordpress lms website that support woocommerce payment gateways. I've found some themes and plugins like: learnpress, wplms and much more Some of them doesn't support uploading video in website (using third party websites like Vimeo or Youtube) and I don't want to use them. I want my website instructors upload their video lessons in my website and other users watch them online. The problem is all of plugins and themes that I've found doesn't prevent …
Category: Web

Video size and border radius using a shortcode

How can I remove the style attribute from the <video> tag? I embedded a video on the front page using the video shortcode and applied a border-radius to it with CSS. It looks good. I modified the video shortcode a bit in functions.php: add_filter( 'wp_video_shortcode', function( $output ) { $output = str_replace( "<video", "<video muted playsinline autoplay loop", $output ); return $output; }); The CSS: #video-246-1_html5{ pointer-events: none !important; border-radius: 20px !important; background: #f4f4f4; } The problem: On mobile I …
Category: Web

Vimeo video play button color function

In the page editor I pasted a Vimeo link: https://vimeo.com/253989945 Which generates the following: <iframe title="Breakaway Music video Shot on the Canon 7D" src="https://player.vimeo.com/video/10679287?dnt=1&app_id=122963" width="580" height="326" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="" data-origwidth="580" data-origheight="326" style="width: 580px; height: 326px;"></iframe> What I'd like to do is add an argument like &color=f1d925 Which would look like: <iframe title="Breakaway Music video Shot on the Canon 7D" src="https://player.vimeo.com/video/10679287?dnt=1&color=f1d925&app_id=122963" width="580" height="326" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="" data-origwidth="580" data-origheight="326" style="width: 580px; height: 326px;"></iframe> I can copy and paste the iframe …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.