How to Integrate RTSP with WordPress
The Real Time Streaming Protocol (RTSP) is an IETF standard for controlling and streaming media over telecommunications networks. It can be used to stream media to users based on their preferences, such as the language they prefer and the volume they want. It allows users to control playback of media and resume playback from wherever they left off, all while maintaining high performance and low latency.
RTSP defines a number of commands that can be used to control features of the media being streamed. However, many of these commands are not human-friendly. For example, the ‘PLAY’ command will start playback of a media stream and the ‘PAUSE’ command will stop it. If the user enters either of these commands by mistake they may find the results unexpected. This is where the WordPress team’s video helper tool comes in handy. It was designed to help users control and monitor their media streams from within WordPress.
Configuring WordPress To Use RTSP
The first step to integrating WordPress and RTSP is to add the RTSP plugin to your WordPress website and configure it to work with your media server.
This can be done by adding the following code to your wp-config.php file:
<?php /** * The name of the RTSP plugin * * @var string */ define( 'WP_MINIMAL_BLOG', true ); // Enable RTSP for this site. define( 'WP_API', true ); /** * Enable RTSP for this site. */ define( 'USE_RTSPS', true ); ?>
You should now see a green light next to the USE_RTSPS option when you visit your WordPress dashboard. If you did not see a green light after adding the code above then you may need to refresh the page. Once the plugin has been activated you can start using the RTSP commands in your WordPress.com/Blog website to control and monitor your media streams. Here are a few useful tips on how to do just that.
Use Plugins To Extend WordPress’ Capabilities
If you have several posts and media on your WordPress site, then the RTSP plugin will only allow you to play media in the context of that particular post. To allow playback of all your media across your entire site, you can use one of the site-wide playback plugins, for example AudioPlayer.
These types of plugins work by adding an audio/video player to your site’s header or footer. When a visitor lands on your site, they will hear/see the media you are playing, regardless of what page they are currently viewing. This kind of plugin is the ultimate in user-friendliness as it does not require the visitor to googley-eyed each time they want to listen or view your content.
Enable HTML Source Code In WordPress
When a user clicks on a link to any page on your site, the destination page will not show any special features unless you have HTML code that uses either embedded media or external media sources to play. To get HTML code that will allow you to play media, look in your WordPress dashboard’s source code for
html tags and see what comes after. For example, if you have a link to a particular page with the following code:
<h1>This Is A Heading <p><p>This is some content that will be displayed on your site. <p><p><h1>This Is Another Heading
And if you click on that link now, the reader will only see This Is A Heading as the content before the link. If you want the user to see This Is Another Heading too when they click a link to any page on your site then you need to add
html tags around the content you want to make visible before and after your link. So above would turn into:
<h1>This Is A Heading <p><p>This is some content that will be displayed on your site. <p><p><h1>This Is Another Heading <p><p><p><h1>This Is Another Heading
html tags around your content will give you the freedom to play any type of media on your site, including video.
Create A Custom Link To Start Playback
If you have a specific type of media that you want to play on your site then you can create a custom link to play that media. To do this, look for the ‘Custom HTML’ field in your WordPress dashboard where you can type HTML code. Above the field is a button with several options, including “Insert Link”. When you click on this button a text box will appear where you can enter the URL of the page you want to link to.
Once the custom link is created, you can give it a short name like “Launch page” or “Start page” and use that instead of the full URL when you click on the link in your post or webpage. So a link to http://www.example.com/my-awesome-post will become
http://www.example.com/my-awesome-post when you click on it.
Disable The Default WordPress Audio Player
The audio player in the WordPress dashboard is useful for displaying audio files in the context of posts and pages. However, for the ultimate in user-friendliness you can use the HTML5 audio tag or the
audio tag instead. So rather than using the default audio player, you can use the `
There are some slight quirks with the HTML5 audio tag. For example, you will need to manually include the `
Monitor & Control Media Streams Remotely
After you have configured your WordPress site to use the RTSP plugin and started playing media on your site, you can use the Dashboard.io app to monitor and control media streams from anywhere, including on your phone.
This feature is useful for when you are not at your site. For example, you can see that a media stream from your WordPress site is currently playing on YouTube and you want to change the volume. Or you are at a coffee shop with your laptop but you want to continue watching your site’s media without having to log off first.
To do this, visit Dashboard.io’s website and create a new account. Once you are logged in you can click on the My Sites button in the top-right corner. You will see a list of all your sites, including the one where you are currently viewing this message. On that list, you can click on the downward-facing arrow beside each site to see the settings for that particular site. (Make sure to click the Settings button to the right of the downward-facing arrow to see the settings interface for that site.)
In the Settings for the site you are viewing, you can see a button that says “Add new site”. When you click this button a window will appear where you can enter the URL for the site you want to add. (Make sure to include the http:// or https:// at the beginning of the URL.)