Embedding Windows Media Player for all browsers

The following works for me in Firefox and Internet Explorer: <object id=”mediaplayer” classid=”clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95″ codebase=”http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701″ standby=”loading microsoft windows media player components…” type=”application/x-oleobject” width=”320″ height=”310″> <param name=”filename” value=”https://stackoverflow.com/questions/164/./test.wmv”> <param name=”animationatstart” value=”true”> <param name=”transparentatstart” value=”true”> <param name=”autostart” value=”true”> <param name=”showcontrols” value=”true”> <param name=”ShowStatusBar” value=”true”> <param name=”windowlessvideo” value=”true”> <embed src=”https://stackoverflow.com/questions/164/./test.wmv” autostart=”true” showcontrols=”true” showstatusbar=”1″ bgcolor=”white” width=”320″ height=”310″> </object>

Using cache in ExoPlayer

Here is the solution for ExoPlayer 2.+ Create a custom cache data source factory public class CacheDataSourceFactory implements DataSource.Factory { private final Context context; private final DefaultDataSourceFactory defaultDatasourceFactory; private final long maxFileSize, maxCacheSize; public CacheDataSourceFactory(Context context, long maxCacheSize, long maxFileSize) { super(); this.context = context; this.maxCacheSize = maxCacheSize; this.maxFileSize = maxFileSize; String userAgent = Util.getUserAgent(context, … Read more

What exactly is Fragmented mp4(fMP4)? How is it different from normal mp4?

A fragmented MP4 contains a series of segments which can be requested individually if your server supports byte-range requests. Boxes aka Atoms All MP4 files use an object oriented format that contains boxes aka atoms. You can view a representation of the boxes in your MP4 using an online tool such as MP4 Parser or … Read more

Django MEDIA_URL and MEDIA_ROOT

UPDATE for Django >= 1.7 Per Django 2.1 documentation: Serving files uploaded by a user during development from django.conf import settings from django.conf.urls.static import static urlpatterns = patterns(”, # … the rest of your URLconf goes here … ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) You no longer need if settings.DEBUG as Django will handle ensuring this is … Read more