Printable Version Printable Version Recommend Recommend Email to a friend Email to a friend

Managing Media on DNN: Options for Displaying Video and Audio

Displaying files on your website using simple modules such as DotNetNuke Links can be a quick and easy way to share small files such as pictures and documents, but if you want to manage a lot of larger media files, it will take a little more effort to create an attractive and effective video or audio library.

Embedding or Uploading?

Audio and video files can be uploaded to your own server, just like other file types, but many media sites such as YouTube also provide the option of embedding their own players, so that you can display their media on your webpage without directing people off site. Adding an embedded YouTube video to DNN is a simple case of clicking on the share button, choosing the embed option, and copying the resulting embedding code into a Text/HTML or media module in code view. Before you do so, you can modify attributes like player size, or switch off the option that displays related videos, which is worth doing to avoid viewers being drawn away.

If you have your own content to upload, it can be sensible to consider uploading it to YouTube which has the capacity to handle billions of views and uploads on a daily basis, and embed it in your site from there. Such a roundabout route will save space on your server, and allow you to create a linking page on YouTube, where you can add information about your website and a backlink in the video description field. However, if you want to exert full control over your content, restrict access or claim exclusivity, then you will need to upload your files straight to your own website. This can also be a sensible option for files like music and audio podcasts that are not suited to video hosting sites. You might even want to download YouTube videos, or create a file from the audio alone, in order to modify or manage it yourself as an uploaded file rather than an embedded one.

Preparing DNN for a Media Library

If you do want to be able to manage your own media files directly, or if you intend to host a lot of video or audio content, then uploading can be a more convenient option than hosting the files elsewhere. However, handling large numbers of big media files requires some preparation, such as checking that the required file types are accepted in host settings, and ensuring that you will be able to upload large files.

Upload sizes are usually limited in order to prevent certain kinds of malicious attacks, but if you do encounter a maximum request length exceeded error message, you can get around it by changing the default upload limit. The DNN limit, at 8MB, is already higher than the typical 4MB, so this may not become a problem. If it does, you can change the upload size limit:

  • Work out the new value you need in kilobytes. One megabyte is equivalent to 1024 kilobytes, so 8MB is 8192kB, and 10MB is 10240kB. 
  • Access the web.config file, from the configuration manager page, available through the host menu. The easiest way to locate the sections you need to modify is through a quick search (Ctrl + F). 
  • Change the "maxRequestLength" to the required value, for example: for a 10MB limit. 
  • If you have enough RAM, you can speed your uploads up by changing the "requestLengthDiskThreshold" to the same value. 
  • You may also want to insert or increase the execution timeout to ensure that a sufficient amount of time allowed for an upload before it is failed for being too slow. The timeout value is given in seconds, for example, for a three-minute timeout.
  • In IIS7 and above, you also need to add a security section to system.webServer in the same web.config file. For a limit of 300 million bytes, you would add.
  • Save the changes and acknowledge the notification that pops up, and your upload limit will be increased as soon as the site resets itself.

Media Gallery and Other Display Modules

Once you have uploaded your media files, you have several options for displaying them on your site. The most obvious choice is the DNN Media Module, which can display various image, music and video files, as long as the file type has been enabled in host settings. To install the Media Module, you need to navigate to the extensions page from the host menu and then select install available extensions from the drop-down menu. Select the box for media, and then click "install selected extensions" to add the module to the list of available components. To place a file in Media Module, you simply upload it and then select it from the list of available files in the edit media options action menu for the module. The benefit of using the Media Module, rather than a simple Text/HTML one, is that the edit menu gives you the option to alter the size of the video, and to choose whether it will auto play when people open the page, or play on a continuous loop once it has been started.

If you feel like you need more flexibility and management options for your media, it may be worthwhile investing in a system like Easy DNN Gallery, which can help you to display your media in slideshows and other types of galleries. This will help to keep your files organized and make it easier for visitors to find and interact with items on your site when you have a lot of media available.


Do you have a question? Ask on our Forum!

Try FREE
30 days money back guaranteed