mirror of
https://github.com/fergalmoran/dss.git
synced 2026-01-06 17:04:30 +00:00
Added embedding
This commit is contained in:
@@ -22,7 +22,10 @@ from spa.models.mix import Mix
|
||||
class MixResource(BackboneCompatibleResource):
|
||||
comments = fields.ToManyField('spa.api.v1.CommentResource.CommentResource', 'comments', null=True)
|
||||
favourites = fields.ToManyField('spa.api.v1.UserResource.UserResource', 'favourites',
|
||||
related_name='favourites', full=True, null=True)
|
||||
related_name='favourites', full=False, null=True)
|
||||
|
||||
likes = fields.ToManyField('spa.api.v1.UserResource.UserResource', 'likes',
|
||||
related_name='likes', full=False, null=True)
|
||||
|
||||
class Meta:
|
||||
queryset = Mix.objects.filter(is_active=True)
|
||||
@@ -33,7 +36,7 @@ class MixResource(BackboneCompatibleResource):
|
||||
filtering = {
|
||||
'comments': ALL_WITH_RELATIONS,
|
||||
'favourites': ALL_WITH_RELATIONS,
|
||||
'activity_likes': ALL_WITH_RELATIONS
|
||||
'likes': ALL_WITH_RELATIONS,
|
||||
}
|
||||
authorization = Authorization()
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
|
||||
from django.db.models import Count, Q
|
||||
from tastypie import fields
|
||||
from tastypie.authentication import Authentication
|
||||
from tastypie.authorization import DjangoAuthorization
|
||||
from tastypie.authentication import Authentication, BasicAuthentication
|
||||
from tastypie.authorization import DjangoAuthorization, Authorization
|
||||
from django.conf.urls import url
|
||||
from tastypie.constants import ALL
|
||||
from tastypie.http import HttpGone, HttpMultipleChoices
|
||||
from tastypie.utils import trailing_slash
|
||||
|
||||
from spa.api.v1.BackboneCompatibleResource import BackboneCompatibleResource
|
||||
@@ -13,9 +15,11 @@ from spa.models.mix import Mix
|
||||
|
||||
|
||||
class UserResource(BackboneCompatibleResource):
|
||||
followers = fields.ToManyField(to='self', attribute='followers',
|
||||
related_name='followers', null=True)
|
||||
|
||||
class Meta:
|
||||
queryset = UserProfile.objects.all().annotate(mix_count=Count('mixes'))\
|
||||
.extra(select={'u':'user'}).order_by('-mix_count')
|
||||
queryset = UserProfile.objects.all().annotate(mix_count=Count('mixes')).order_by('-mix_count')
|
||||
favourites = fields.ToManyField('spa.api.v1.MixResource.MixResource', 'favourites', null=True)
|
||||
resource_name = 'user'
|
||||
excludes = ['is_active', 'is_staff', 'is_superuser', 'password']
|
||||
@@ -23,8 +27,8 @@ class UserResource(BackboneCompatibleResource):
|
||||
filtering = {
|
||||
'slug': ALL,
|
||||
}
|
||||
authorization = DjangoAuthorization()
|
||||
authentication = Authentication()
|
||||
authorization = Authorization()
|
||||
authentication = BasicAuthentication()
|
||||
favourites = fields.ToManyField('spa.api.v1.MixResource', 'favourites')
|
||||
|
||||
def _hydrateBitmapOption(self, source, comparator):
|
||||
@@ -39,15 +43,10 @@ class UserResource(BackboneCompatibleResource):
|
||||
self.wrap_view('dispatch_detail'), name="api_dispatch_detail"),
|
||||
url(r"^(?P<resource_name>%s)/(?P<slug>[\w\d_.-]+)/$" % self._meta.resource_name,
|
||||
self.wrap_view('dispatch_detail'), name="api_dispatch_detail"),
|
||||
url(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/followers%s$" % (self._meta.resource_name, trailing_slash()),
|
||||
self.wrap_view('get_followers'), name="api_get_followers"),
|
||||
]
|
||||
|
||||
"""
|
||||
Stub method, not actually needed just yet
|
||||
but take heed of note below when implementing in the future
|
||||
def apply_sorting(self, obj_list, options=None):
|
||||
#apply the sort to the obj_list, not the super call
|
||||
"""
|
||||
|
||||
def apply_filters(self, request, applicable_filters):
|
||||
semi_filtered = super(UserResource, self).apply_filters(request, applicable_filters)
|
||||
return semi_filtered
|
||||
@@ -77,6 +76,7 @@ class UserResource(BackboneCompatibleResource):
|
||||
bundle.obj.remove_follower(bundle.request.user.get_profile())
|
||||
|
||||
def obj_update(self, bundle, skip_errors=False, **kwargs):
|
||||
|
||||
"""
|
||||
This feels extremely hacky - but for some reason, deleting from the bundle
|
||||
in hydrate is not preventing the fields from being serialized at the ORM
|
||||
@@ -94,7 +94,6 @@ class UserResource(BackboneCompatibleResource):
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
return super(UserResource, self).obj_update(bundle, skip_errors, **kwargs)
|
||||
|
||||
def dehydrate_description(self, bundle):
|
||||
@@ -123,7 +122,7 @@ class UserResource(BackboneCompatibleResource):
|
||||
self._hydrateBitmapOption(bundle.obj.activity_sharing_networks,
|
||||
UserProfile.ACTIVITY_SHARE_NETWORK_TWITTER)
|
||||
|
||||
bundle.data['like_count'] = Mix.objects.filter(activity_likes__user=bundle.obj).count()
|
||||
bundle.data['like_count'] = Mix.objects.filter(likes__user=bundle.obj).count()
|
||||
bundle.data['favourite_count'] = Mix.objects.filter(favourites__user=bundle.obj).count()
|
||||
bundle.data['follower_count'] = bundle.obj.followers.count()
|
||||
bundle.data['following_count'] = bundle.obj.following.count()
|
||||
@@ -155,3 +154,15 @@ class UserResource(BackboneCompatibleResource):
|
||||
del bundle.data['activity_sharing_networks_twitter']
|
||||
|
||||
return bundle
|
||||
|
||||
def get_followers(self, request, **kwargs):
|
||||
try:
|
||||
basic_bundle = self.build_bundle(request=request)
|
||||
obj = self.cached_obj_get(bundle=basic_bundle, **self.remove_api_resource_names(kwargs))
|
||||
except ObjectDoesNotExist:
|
||||
return HttpGone()
|
||||
except MultipleObjectsReturned:
|
||||
return HttpMultipleChoices("More than one resource is found at this URI.")
|
||||
|
||||
child_resource = UserResource()
|
||||
return child_resource.get_list(request, mix=obj)
|
||||
|
||||
16
spa/api/v1/auth.py
Normal file
16
spa/api/v1/auth.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from tastypie.authorization import Authorization
|
||||
|
||||
|
||||
class UserOwnsRowAuthorisation(Authorization):
|
||||
"""
|
||||
If the user is already authenticated by a django session it will
|
||||
allow the request (useful for ajax calls) .
|
||||
In addition, we will check that the user owns the row being updated
|
||||
or is an admin
|
||||
"""
|
||||
|
||||
def apply_limits(self, request, object_list):
|
||||
if request and hasattr(request, 'user'):
|
||||
return object_list.filter(author__username=request.user.username)
|
||||
|
||||
return object_list.none()
|
||||
1
spa/embedding/__init__.py
Normal file
1
spa/embedding/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__author__ = 'fergalm'
|
||||
7
spa/embedding/urls.py
Normal file
7
spa/embedding/urls.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^mix/(?P<mix_id>\d+)/$', 'spa.embedding.views.mix', name='embed_mix'),
|
||||
url(r'^mix/(?P<slug>[\w\d_.-]+)/$', 'spa.embedding.views.mix', name='embed_mix_slug'),
|
||||
)
|
||||
34
spa/embedding/views.py
Normal file
34
spa/embedding/views.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from django.contrib.sites.models import Site
|
||||
from django.http import Http404
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
from spa.models import Mix
|
||||
|
||||
|
||||
def mix(request, **args):
|
||||
try:
|
||||
if 'mix_id' in args:
|
||||
mix = Mix.objects.get(pk=args['mix_id'])
|
||||
else:
|
||||
mix = Mix.objects.get(slug=args['slug'])
|
||||
except Mix.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
image = mix.get_image_url('1500x1500')
|
||||
audio_url = mix.get_stream_path()
|
||||
mix_url = mix.get_absolute_url()
|
||||
payload = {
|
||||
"description": mix.description.replace('<br />', '\n'),
|
||||
"title": mix.title,
|
||||
"image_url": image,
|
||||
"audio_url": audio_url,
|
||||
"mix_url": 'http://%s%s' % (Site.objects.get_current().domain, mix_url)
|
||||
}
|
||||
response = render_to_response(
|
||||
'inc/embed/mix.html',
|
||||
payload,
|
||||
context_instance=RequestContext(request)
|
||||
)
|
||||
response['X-XSS-Protection'] = 0
|
||||
response['X-Frame-Options'] = 'IGNORE'
|
||||
return response
|
||||
@@ -5,8 +5,9 @@ from spa.models import Mix
|
||||
class Command(NoArgsCommand):
|
||||
def handle_noargs(self, **options):
|
||||
try:
|
||||
list = Mix.objects.filter(slug='dss-on-deepvibes-radio-17th-july-jamie-o-sullivan')[0]
|
||||
for fav in list.favourites.all():
|
||||
#l = Mix.objects.filter(slug='dss-on-deepvibes-radio-17th-july-jamie-o-sullivan')[0]
|
||||
l = Mix.objects.filter(favourites__slug='fergalmoran')[0]
|
||||
for fav in l.favourites.all():
|
||||
print fav.slug
|
||||
pass
|
||||
except Exception, ex:
|
||||
|
||||
15
spa/management/commands/import_favourites.py
Normal file
15
spa/management/commands/import_favourites.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
from spa.models.activity import ActivityFavourite
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
def handle_noargs(self, **options):
|
||||
try:
|
||||
l = ActivityFavourite.objects.all()
|
||||
for item in l:
|
||||
m = item.mix
|
||||
m.favourites.add(item.user)
|
||||
m.save()
|
||||
|
||||
except Exception, ex:
|
||||
print "Debug exception: %s" % ex.message
|
||||
15
spa/management/commands/import_likes.py
Normal file
15
spa/management/commands/import_likes.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
from spa.models.activity import ActivityFavourite, ActivityLike
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
def handle_noargs(self, **options):
|
||||
try:
|
||||
l = ActivityLike.objects.all()
|
||||
for item in l:
|
||||
m = item.mix
|
||||
m.favourites.add(item.user)
|
||||
m.save()
|
||||
|
||||
except Exception, ex:
|
||||
print "Debug exception: %s" % ex.message
|
||||
@@ -50,7 +50,8 @@ class Mix(_BaseModel):
|
||||
genres = models.ManyToManyField(Genre)
|
||||
|
||||
#activity based stuff
|
||||
favourites = models.ManyToManyField(UserProfile, blank=True, null=True)
|
||||
favourites = models.ManyToManyField(UserProfile, related_name='favourites', blank=True, null=True)
|
||||
likes = models.ManyToManyField(UserProfile, related_name='likes', blank=True, null=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.title
|
||||
@@ -168,14 +169,6 @@ class Mix(_BaseModel):
|
||||
except Exception, e:
|
||||
self.logger.exception("Unable to add mix play: %s" % e.message)
|
||||
|
||||
def is_liked(self, user):
|
||||
if user is None:
|
||||
return False
|
||||
if user.is_authenticated():
|
||||
return self.activity_likes.filter(user=user).count() != 0
|
||||
|
||||
return False
|
||||
|
||||
def update_favourite(self, user, value):
|
||||
try:
|
||||
if user is None:
|
||||
@@ -198,10 +191,12 @@ class Mix(_BaseModel):
|
||||
return
|
||||
if user.is_authenticated():
|
||||
if value:
|
||||
if self.activity_likes.filter(user=user).count() == 0:
|
||||
ActivityLike(user=user.get_profile(), mix=self).save()
|
||||
if self.likes.filter(user=user).count() == 0:
|
||||
self.likes.add(user.get_profile())
|
||||
self.save()
|
||||
else:
|
||||
self.activity_likes.filter(user=user).delete()
|
||||
self.likes.remove(user.get_profile())
|
||||
self.save()
|
||||
except Exception, ex:
|
||||
self.logger.error("Exception updating like: %s" % ex.message)
|
||||
|
||||
@@ -212,3 +207,12 @@ class Mix(_BaseModel):
|
||||
return self.favourites.filter(user=user).count() != 0
|
||||
else:
|
||||
return False
|
||||
|
||||
def is_liked(self, user):
|
||||
if user is None:
|
||||
return False
|
||||
if user.is_authenticated():
|
||||
return self.likes.filter(user=user).count() != 0
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from django.contrib.sites.models import Site
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template.context import RequestContext
|
||||
from htmlmin.decorators import not_minified_response
|
||||
from dss import localsettings
|
||||
from spa.forms import UserForm
|
||||
from spa.models import UserProfile
|
||||
|
||||
__author__ = 'fergalm'
|
||||
|
||||
@@ -24,7 +24,18 @@ def get_template_ex(request, template_name):
|
||||
|
||||
|
||||
@not_minified_response
|
||||
def get_dialog(request, dialog_name):
|
||||
def get_embed_codes_dialog(request, slug):
|
||||
payload = {
|
||||
'embed_code': 'http://%s/embed/%s' % (Site.objects.get_current().domain, slug)
|
||||
}
|
||||
return render_to_response(
|
||||
'views/dlg/EmbedCodes.html',
|
||||
payload,
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@not_minified_response
|
||||
def get_dialog(request, dialog_name, **kwargs):
|
||||
return render_to_response(
|
||||
'views/dlg/%s.html' % dialog_name,
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@@ -33,12 +33,15 @@ urlpatterns = patterns(
|
||||
url(r'^$', 'spa.views.app', name='home'),
|
||||
url(r'^tpl/(?P<template_name>\w+)/$', 'spa.templates.get_template'),
|
||||
url(r'^dlg/(?P<dialog_name>\w+)/$', 'spa.templates.get_dialog'),
|
||||
url(r'^dlg/embed/(?P<slug>[\w\d_.-]+)/$', 'spa.templates.get_embed_codes_dialog'),
|
||||
|
||||
url(r'^js/(?P<template_name>\w+)/$', 'spa.templates.get_javascript'),
|
||||
url(r'^tplex/(?P<template_name>\w+)/$', 'spa.templates.get_template_ex'),
|
||||
url(r'^podcast\.xml', 'spa.podcast.get_default_podcast'),
|
||||
url(r'^podcast', 'spa.podcast.get_default_podcast'),
|
||||
url(r'^podcasts', 'spa.podcast.get_default_podcast'),
|
||||
url(r'^social/', include('spa.social.urls')),
|
||||
url(r'^embed/', include('spa.embedding.urls')),
|
||||
url(r'^ajax/', include(ajax.urls)),
|
||||
url(r'^audio/', include(audio.urls)),
|
||||
url(r'^api/', include(v1_api.urls)),
|
||||
|
||||
BIN
static/bin/flashmediaelement.swf
Normal file
BIN
static/bin/flashmediaelement.swf
Normal file
Binary file not shown.
BIN
static/bin/silverlightmediaelement.xap
Normal file
BIN
static/bin/silverlightmediaelement.xap
Normal file
Binary file not shown.
1
static/css/controls.svg
Normal file
1
static/css/controls.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 10 KiB |
869
static/css/mediaelementplayer.css
Normal file
869
static/css/mediaelementplayer.css
Normal file
@@ -0,0 +1,869 @@
|
||||
.mejs-container {
|
||||
position: relative;
|
||||
background: #000;
|
||||
font-family: Helvetica, Arial;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
.me-plugin {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.mejs-embed, .mejs-embed body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mejs-fullscreen {
|
||||
/* set it to not show scroll bars so 100% will work */
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.mejs-container-fullscreen {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
z-index: 1000;
|
||||
}
|
||||
.mejs-container-fullscreen .mejs-mediaelement,
|
||||
.mejs-container-fullscreen video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mejs-clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Start: LAYERS */
|
||||
.mejs-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mejs-mediaelement {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mejs-poster {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-size: contain ;
|
||||
background-position: 50% 50% ;
|
||||
background-repeat: no-repeat ;
|
||||
}
|
||||
:root .mejs-poster img {
|
||||
display: none ;
|
||||
}
|
||||
|
||||
.mejs-poster img {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.mejs-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mejs-overlay-play {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mejs-overlay-button {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: -50px 0 0 -50px;
|
||||
background: url(bigplay.svg) no-repeat;
|
||||
}
|
||||
|
||||
.no-svg .mejs-overlay-button {
|
||||
background-image: url(bigplay.png);
|
||||
}
|
||||
|
||||
.mejs-overlay:hover .mejs-overlay-button {
|
||||
background-position: 0 -100px ;
|
||||
}
|
||||
|
||||
.mejs-overlay-loading {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin: -40px 0 0 -40px;
|
||||
background: #333;
|
||||
background: url(background.png);
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9)));
|
||||
background: -webkit-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
||||
background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
||||
background: -o-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
||||
background: -ms-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
||||
background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
||||
}
|
||||
|
||||
.mejs-overlay-loading span {
|
||||
display: block;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background: transparent url(loading.gif) 50% 50% no-repeat;
|
||||
}
|
||||
|
||||
/* End: LAYERS */
|
||||
|
||||
/* Start: CONTROL BAR */
|
||||
.mejs-container .mejs-controls {
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: url(background.png);
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
|
||||
background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
.mejs-container .mejs-controls div {
|
||||
list-style-type: none;
|
||||
background-image: none;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
font-size: 11px;
|
||||
line-height: 11px;
|
||||
font-family: Helvetica, Arial;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-button button {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
text-decoration: none;
|
||||
margin: 7px 5px;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
border: 0;
|
||||
background: transparent url(controls.svg) no-repeat;
|
||||
}
|
||||
|
||||
.no-svg .mejs-controls .mejs-button button {
|
||||
background-image: url(controls.png);
|
||||
}
|
||||
|
||||
/* :focus for accessibility */
|
||||
.mejs-controls .mejs-button button:focus {
|
||||
outline: solid 1px yellow;
|
||||
}
|
||||
|
||||
/* End: CONTROL BAR */
|
||||
|
||||
/* Start: Time (Current / Duration) */
|
||||
.mejs-container .mejs-controls .mejs-time {
|
||||
color: #fff;
|
||||
display: block;
|
||||
height: 17px;
|
||||
width: auto;
|
||||
padding: 8px 3px 0 3px ;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.mejs-container .mejs-controls .mejs-time span {
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
line-height: 12px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 1px 2px 0 0;
|
||||
width: auto;
|
||||
}
|
||||
/* End: Time (Current / Duration) */
|
||||
|
||||
/* Start: Play/Pause/Stop */
|
||||
.mejs-controls .mejs-play button {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-pause button {
|
||||
background-position: 0 -16px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-stop button {
|
||||
background-position: -112px 0;
|
||||
}
|
||||
/* Start: Play/Pause/Stop */
|
||||
|
||||
/* Start: Progress Bar */
|
||||
.mejs-controls div.mejs-time-rail {
|
||||
width: 200px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 180px;
|
||||
height: 10px;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-total {
|
||||
margin: 5px;
|
||||
background: #333;
|
||||
background: rgba(50,50,50,0.8);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
|
||||
background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-buffering {
|
||||
width: 100%;
|
||||
background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
|
||||
background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
|
||||
-webkit-background-size: 15px 15px;
|
||||
-moz-background-size: 15px 15px;
|
||||
-o-background-size: 15px 15px;
|
||||
background-size: 15px 15px;
|
||||
-webkit-animation: buffering-stripes 2s linear infinite;
|
||||
-moz-animation: buffering-stripes 2s linear infinite;
|
||||
-ms-animation: buffering-stripes 2s linear infinite;
|
||||
-o-animation: buffering-stripes 2s linear infinite;
|
||||
animation: buffering-stripes 2s linear infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
||||
@-moz-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
||||
@-ms-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
||||
@-o-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
||||
@keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-loaded {
|
||||
background: #3caac8;
|
||||
background: rgba(60,170,200,0.8);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(44,124,145,0.8)), to(rgba(78,183,212,0.8)));
|
||||
background: -webkit-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
|
||||
background: -moz-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
|
||||
background: -o-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
|
||||
background: -ms-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
|
||||
background: linear-gradient(rgba(44,124,145,0.8), rgba(78,183,212,0.8));
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-current {
|
||||
background: #fff;
|
||||
background: rgba(255,255,255,0.8);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
|
||||
background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-handle {
|
||||
display: none;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
width: 10px;
|
||||
background: #fff;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
border: solid 2px #333;
|
||||
top: -2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-float {
|
||||
position: absolute;
|
||||
display: none;
|
||||
background: #eee;
|
||||
width: 36px;
|
||||
height: 17px;
|
||||
border: solid 1px #333;
|
||||
top: -26px;
|
||||
margin-left: -18px;
|
||||
text-align: center;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-float-current {
|
||||
margin: 2px;
|
||||
width: 30px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-time-rail .mejs-time-float-corner {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
border: solid 5px #eee;
|
||||
border-color: #eee transparent transparent transparent;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
top: 15px;
|
||||
left: 13px;
|
||||
}
|
||||
|
||||
.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float {
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current {
|
||||
width: 44px;
|
||||
}
|
||||
|
||||
.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner {
|
||||
left: 18px;
|
||||
}
|
||||
|
||||
/*
|
||||
.mejs-controls .mejs-time-rail:hover .mejs-time-handle {
|
||||
visibility:visible;
|
||||
}
|
||||
*/
|
||||
/* End: Progress Bar */
|
||||
|
||||
/* Start: Fullscreen */
|
||||
.mejs-controls .mejs-fullscreen-button button {
|
||||
background-position: -32px 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-unfullscreen button {
|
||||
background-position: -32px -16px;
|
||||
}
|
||||
/* End: Fullscreen */
|
||||
|
||||
|
||||
/* Start: Mute/Volume */
|
||||
.mejs-controls .mejs-volume-button {
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-mute button {
|
||||
background-position: -16px -16px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-unmute button {
|
||||
background-position: -16px 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-volume-button {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-volume-button .mejs-volume-slider {
|
||||
display: none;
|
||||
height: 115px;
|
||||
width: 25px;
|
||||
background: url(background.png);
|
||||
background: rgba(50, 50, 50, 0.7);
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
top: -115px;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-volume-button:hover {
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
-moz-border-radius: 0 0 4px 4px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
.mejs-controls .mejs-volume-button:hover .mejs-volume-slider {
|
||||
display: block;
|
||||
}
|
||||
*/
|
||||
|
||||
.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total {
|
||||
position: absolute;
|
||||
left: 11px;
|
||||
top: 8px;
|
||||
width: 2px;
|
||||
height: 100px;
|
||||
background: #ddd;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current {
|
||||
position: absolute;
|
||||
left: 11px;
|
||||
top: 8px;
|
||||
width: 2px;
|
||||
height: 100px;
|
||||
background: #ddd;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: -3px;
|
||||
width: 16px;
|
||||
height: 6px;
|
||||
background: #ddd;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
cursor: N-resize;
|
||||
-webkit-border-radius: 1px;
|
||||
-moz-border-radius: 1px;
|
||||
border-radius: 1px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* horizontal version */
|
||||
.mejs-controls div.mejs-horizontal-volume-slider {
|
||||
height: 26px;
|
||||
width: 60px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 11px;
|
||||
width: 50px;
|
||||
height: 8px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 1px;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
background: #333;
|
||||
background: rgba(50,50,50,0.8);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
|
||||
background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 11px;
|
||||
width: 50px;
|
||||
height: 8px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 1px;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
background: #fff;
|
||||
background: rgba(255,255,255,0.8);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
|
||||
background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8));
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* End: Mute/Volume */
|
||||
|
||||
/* Start: Track (Captions and Chapters) */
|
||||
.mejs-controls .mejs-captions-button {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-captions-button button {
|
||||
background-position: -48px 0;
|
||||
}
|
||||
.mejs-controls .mejs-captions-button .mejs-captions-selector {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
bottom: 26px;
|
||||
right: -10px;
|
||||
width: 130px;
|
||||
height: 100px;
|
||||
background: url(background.png);
|
||||
background: rgba(50,50,50,0.7);
|
||||
border: solid 1px transparent;
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
.mejs-controls .mejs-captions-button:hover .mejs-captions-selector {
|
||||
visibility: visible;
|
||||
}
|
||||
*/
|
||||
|
||||
.mejs-controls .mejs-captions-button .mejs-captions-selector ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
list-style-type: none !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-captions-button .mejs-captions-selector ul li {
|
||||
margin: 0 0 6px 0;
|
||||
padding: 0;
|
||||
list-style-type: none !important;
|
||||
display: block;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input {
|
||||
clear: both;
|
||||
float: left;
|
||||
margin: 3px 3px 0 5px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label {
|
||||
width: 100px;
|
||||
float: left;
|
||||
padding: 4px 0 0 0;
|
||||
line-height: 15px;
|
||||
font-family: helvetica, arial;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-captions-button .mejs-captions-translations {
|
||||
font-size: 10px;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
.mejs-chapters {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
-xborder-right: solid 1px #fff;
|
||||
width: 10000px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.mejs-chapters .mejs-chapter {
|
||||
position: absolute;
|
||||
float: left;
|
||||
background: #222;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
|
||||
background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
|
||||
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232,endColorstr=#000000);
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.mejs-chapters .mejs-chapter .mejs-chapter-block {
|
||||
font-size: 11px;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
border-right: solid 1px #333;
|
||||
border-bottom: solid 1px #333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mejs-chapters .mejs-chapter .mejs-chapter-block-last {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.mejs-chapters .mejs-chapter .mejs-chapter-block:hover {
|
||||
background: #666;
|
||||
background: rgba(102,102,102, 0.7);
|
||||
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(102,102,102,0.7)), to(rgba(50,50,50,0.6)));
|
||||
background: -webkit-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
|
||||
background: -moz-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
|
||||
background: -o-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
|
||||
background: -ms-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
|
||||
background: linear-gradient(rgba(102,102,102,0.7), rgba(50,50,50,0.6));
|
||||
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666,endColorstr=#323232);
|
||||
}
|
||||
|
||||
.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin: 0 0 3px 0;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
margin: 3px 0 4px 0;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mejs-captions-layer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
text-align:center;
|
||||
line-height: 22px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mejs-captions-layer a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.mejs-captions-layer[lang=ar] {
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.mejs-captions-position {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 15px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mejs-captions-position-hover {
|
||||
bottom: 45px;
|
||||
}
|
||||
|
||||
.mejs-captions-text {
|
||||
padding: 3px 5px;
|
||||
background: url(background.png);
|
||||
background: rgba(20, 20, 20, 0.8);
|
||||
|
||||
}
|
||||
/* End: Track (Captions and Chapters) */
|
||||
|
||||
/* Start: Error */
|
||||
.me-cannotplay {
|
||||
}
|
||||
|
||||
.me-cannotplay a {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.me-cannotplay span {
|
||||
padding: 15px;
|
||||
display: block;
|
||||
}
|
||||
/* End: Error */
|
||||
|
||||
|
||||
/* Start: Loop */
|
||||
.mejs-controls .mejs-loop-off button {
|
||||
background-position: -64px -16px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-loop-on button {
|
||||
background-position: -64px 0;
|
||||
}
|
||||
|
||||
/* End: Loop */
|
||||
|
||||
/* Start: backlight */
|
||||
.mejs-controls .mejs-backlight-off button {
|
||||
background-position: -80px -16px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-backlight-on button {
|
||||
background-position: -80px 0;
|
||||
}
|
||||
/* End: backlight */
|
||||
|
||||
/* Start: Picture Controls */
|
||||
.mejs-controls .mejs-picturecontrols-button {
|
||||
background-position: -96px 0;
|
||||
}
|
||||
/* End: Picture Controls */
|
||||
|
||||
|
||||
/* context menu */
|
||||
.mejs-contextmenu {
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border: solid 1px #999;
|
||||
z-index: 1001; /* make sure it shows on fullscreen */
|
||||
}
|
||||
.mejs-contextmenu .mejs-contextmenu-separator {
|
||||
height: 1px;
|
||||
font-size: 0;
|
||||
margin: 5px 6px;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.mejs-contextmenu .mejs-contextmenu-item {
|
||||
font-family: Helvetica, Arial;
|
||||
font-size: 12px;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
}
|
||||
.mejs-contextmenu .mejs-contextmenu-item:hover {
|
||||
background: #2C7C91;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Start: Source Chooser */
|
||||
.mejs-controls .mejs-sourcechooser-button {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-sourcechooser-button button {
|
||||
background-position: -128px 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
bottom: 26px;
|
||||
right: -10px;
|
||||
width: 130px;
|
||||
height: 100px;
|
||||
background: url(background.png);
|
||||
background: rgba(50,50,50,0.7);
|
||||
border: solid 1px transparent;
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
list-style-type: none !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li {
|
||||
margin: 0 0 6px 0;
|
||||
padding: 0;
|
||||
list-style-type: none !important;
|
||||
display: block;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input {
|
||||
clear: both;
|
||||
float: left;
|
||||
margin: 3px 3px 0 5px;
|
||||
}
|
||||
|
||||
.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label {
|
||||
width: 100px;
|
||||
float: left;
|
||||
padding: 4px 0 0 0;
|
||||
line-height: 15px;
|
||||
font-family: helvetica, arial;
|
||||
font-size: 10px;
|
||||
}
|
||||
/* End: Source Chooser */
|
||||
|
||||
/* Start: Postroll */
|
||||
.mejs-postroll-layer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url(background.png);
|
||||
background: rgba(50,50,50,0.7);
|
||||
z-index: 1000;
|
||||
overflow: hidden;
|
||||
}
|
||||
.mejs-postroll-layer-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.mejs-postroll-close {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
background: url(background.png);
|
||||
background: rgba(50,50,50,0.7);
|
||||
color: #fff;
|
||||
padding: 4px;
|
||||
z-index: 100;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* End: Postroll */
|
||||
289
static/css/mejs-skins.css
Normal file
289
static/css/mejs-skins.css
Normal file
@@ -0,0 +1,289 @@
|
||||
/* TED player */
|
||||
.mejs-container.mejs-ted {
|
||||
|
||||
}
|
||||
.mejs-ted .mejs-controls {
|
||||
background: #eee;
|
||||
height: 65px;
|
||||
}
|
||||
|
||||
.mejs-ted .mejs-button,
|
||||
.mejs-ted .mejs-time {
|
||||
position: absolute;
|
||||
background: #ddd;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-total {
|
||||
background-color: none;
|
||||
background: url(controls-ted.png) repeat-x 0 -52px;
|
||||
height: 6px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-buffering {
|
||||
height: 6px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-loaded {
|
||||
background-color: none;
|
||||
background: url(controls-ted.png) repeat-x 0 -52px;
|
||||
width: 0;
|
||||
height: 6px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-current {
|
||||
width: 0;
|
||||
height: 6px;
|
||||
background-color: none;
|
||||
background: url(controls-ted.png) repeat-x 0 -59px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-handle {
|
||||
display: block;
|
||||
margin: 0;
|
||||
width: 14px;
|
||||
height: 21px;
|
||||
top: -7px;
|
||||
border: 0;
|
||||
background: url(controls-ted.png) no-repeat 0 0;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-float {
|
||||
display: none;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-playpause-button {
|
||||
top: 29px;
|
||||
left: 9px;
|
||||
width: 49px;
|
||||
height: 28px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-playpause-button button {
|
||||
width: 49px;
|
||||
height: 28px;
|
||||
background: url(controls-ted.png) no-repeat -50px -23px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-pause button {
|
||||
background-position: 0 -23px;
|
||||
}
|
||||
|
||||
.mejs-ted .mejs-controls .mejs-fullscreen-button {
|
||||
top: 34px;
|
||||
right: 9px;
|
||||
width: 17px;
|
||||
height: 15px;
|
||||
background : none;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-fullscreen-button button {
|
||||
width: 19px;
|
||||
height: 17px;
|
||||
background: transparent url(controls-ted.png) no-repeat 0 -66px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-unfullscreen button {
|
||||
background: transparent url(controls-ted.png) no-repeat -21px -66px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-volume-button {
|
||||
top: 30px;
|
||||
right: 35px;
|
||||
width: 24px;
|
||||
height: 22px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-mute button {
|
||||
background: url(controls-ted.png) no-repeat -15px 0;
|
||||
width: 24px;
|
||||
height: 22px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-unmute button {
|
||||
background: url(controls-ted.png) no-repeat -40px 0;
|
||||
width: 24px;
|
||||
height: 22px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-slider {
|
||||
background: #fff;
|
||||
border: solid 1px #aaa;
|
||||
border-width: 1px 1px 0 1px;
|
||||
width: 22px;
|
||||
height: 65px;
|
||||
top: -65px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-total {
|
||||
background: url(controls-ted.png) repeat-y -41px -66px;
|
||||
left: 8px;
|
||||
width: 6px;
|
||||
height: 50px;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-current {
|
||||
left: 8px;
|
||||
width: 6px;
|
||||
background: url(controls-ted.png) repeat-y -48px -66px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mejs-ted .mejs-controls .mejs-time span {
|
||||
color: #333;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-currenttime-container {
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
right: 100px;
|
||||
border: solid 1px #999;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
padding-top: 2px;
|
||||
border-radius: 3px;
|
||||
color: #333;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-duration-container {
|
||||
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
right: 65px;
|
||||
border: solid 1px #999;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
padding-top: 2px;
|
||||
border-radius: 3px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mejs-ted .mejs-controls .mejs-time button{
|
||||
color: #333;
|
||||
}
|
||||
.mejs-ted .mejs-controls .mejs-captions-button {
|
||||
display: none;
|
||||
}
|
||||
/* END: TED player */
|
||||
|
||||
|
||||
/* WMP player */
|
||||
.mejs-container.mejs-wmp {
|
||||
|
||||
}
|
||||
.mejs-wmp .mejs-controls {
|
||||
background: transparent url(controls-wmp-bg.png) center 16px no-repeat;
|
||||
height: 65px;
|
||||
}
|
||||
|
||||
.mejs-wmp .mejs-button,
|
||||
.mejs-wmp .mejs-time {
|
||||
position: absolute;
|
||||
background: transparent;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-total {
|
||||
background-color: transparent;
|
||||
border: solid 1px #ccc;
|
||||
height: 3px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-buffering {
|
||||
height: 3px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-loaded {
|
||||
background-color: rgba(255,255,255,0.3);
|
||||
width: 0;
|
||||
height: 3px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-current {
|
||||
width: 0;
|
||||
height: 1px;
|
||||
background-color: #014CB6;
|
||||
border: solid 1px #7FC9FA;
|
||||
border-width: 1px 0;
|
||||
border-color: #7FC9FA #fff #619FF2 #fff;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-handle {
|
||||
display: block;
|
||||
margin: 0;
|
||||
width: 16px;
|
||||
height: 9px;
|
||||
top: -3px;
|
||||
border: 0;
|
||||
background: url(controls-wmp.png) no-repeat 0 -80px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-float {
|
||||
display: none;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-playpause-button {
|
||||
top: 10px;
|
||||
left: 50%;
|
||||
margin: 10px 0 0 -20px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-playpause-button button {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: url(controls-wmp.png) no-repeat 0 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-pause button {
|
||||
background-position: 0 -40px;
|
||||
}
|
||||
|
||||
.mejs-wmp .mejs-controls .mejs-currenttime-container {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 50%;
|
||||
margin-left: -93px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-duration-container {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 50%;
|
||||
margin-left: -58px;
|
||||
}
|
||||
|
||||
|
||||
.mejs-wmp .mejs-controls .mejs-volume-button {
|
||||
top: 32px;
|
||||
right: 50%;
|
||||
margin-right: -55px;
|
||||
width: 20px;
|
||||
height: 15px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-volume-button button {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: url(controls-wmp.png) no-repeat -42px -17px;
|
||||
width: 20px;
|
||||
height: 15px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-unmute button {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: url(controls-wmp.png) no-repeat -42px 0;
|
||||
width: 20px;
|
||||
height: 15px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-volume-button .mejs-volume-slider {
|
||||
background: rgba(102,102,102,0.6);
|
||||
}
|
||||
|
||||
.mejs-wmp .mejs-controls .mejs-fullscreen-button {
|
||||
top: 32px;
|
||||
right: 50%;
|
||||
margin-right: -82px;
|
||||
width: 15px;
|
||||
height: 14px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-fullscreen-button button {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: url(controls-wmp.png) no-repeat -63px 0;
|
||||
width: 15px;
|
||||
height: 14px;
|
||||
}
|
||||
.mejs-wmp .mejs-controls .mejs-captions-button {
|
||||
display: none;
|
||||
}
|
||||
/* END: WMP player */
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
define ['backbone', 'marionette', 'vent', 'utils'
|
||||
'app.lib/router', 'app.lib/panningRegion', 'app.lib/realtimeController', 'app.lib/audioController',
|
||||
define ['backbone', 'marionette', 'vent', 'utils',
|
||||
'app.lib/social', 'app.lib/router', 'app.lib/panningRegion', 'app.lib/realtimeController', 'app.lib/audioController',
|
||||
'views/widgets/headerView', 'views/sidebar/sidebarView', 'models/mix/mixCollection'],
|
||||
(Backbone, Marionette, vent, utils,
|
||||
DssRouter, PanningRegion, RealtimeController, AudioController,
|
||||
HeaderView, SidebarView, MixCollection) ->
|
||||
(Backbone, Marionette, vent, utils, social, DssRouter, PanningRegion, RealtimeController, AudioController, HeaderView, SidebarView, MixCollection) ->
|
||||
App = new Marionette.Application();
|
||||
App.audioController = new AudioController();
|
||||
App.realtimeController = new RealtimeController();
|
||||
@@ -64,11 +62,14 @@ define ['backbone', 'marionette', 'vent', 'utils'
|
||||
true
|
||||
|
||||
@listenTo vent, "mix:share", (mode, model) ->
|
||||
console.log "App(vent): mix:share"
|
||||
console.log "App(vent): mix:share (" + mode + ")"
|
||||
if (mode == "facebook")
|
||||
social.sharePageToFacebook(model);
|
||||
else if (mode == "twitter")
|
||||
social.sharePageToTwitter(model);
|
||||
else if (mode == "embed")
|
||||
social.generateEmbedCode(model)
|
||||
|
||||
true
|
||||
|
||||
App.headerRegion.show(new HeaderView());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
(function() {
|
||||
define(['backbone', 'marionette', 'vent', 'utils', 'app.lib/router', 'app.lib/panningRegion', 'app.lib/realtimeController', 'app.lib/audioController', 'views/widgets/headerView', 'views/sidebar/sidebarView', 'models/mix/mixCollection'], function(Backbone, Marionette, vent, utils, DssRouter, PanningRegion, RealtimeController, AudioController, HeaderView, SidebarView, MixCollection) {
|
||||
define(['backbone', 'marionette', 'vent', 'utils', 'app.lib/social', 'app.lib/router', 'app.lib/panningRegion', 'app.lib/realtimeController', 'app.lib/audioController', 'views/widgets/headerView', 'views/sidebar/sidebarView', 'models/mix/mixCollection'], function(Backbone, Marionette, vent, utils, social, DssRouter, PanningRegion, RealtimeController, AudioController, HeaderView, SidebarView, MixCollection) {
|
||||
var App, sidebarView;
|
||||
|
||||
App = new Marionette.Application();
|
||||
@@ -76,11 +76,13 @@
|
||||
return true;
|
||||
});
|
||||
return this.listenTo(vent, "mix:share", function(mode, model) {
|
||||
console.log("App(vent): mix:share");
|
||||
console.log("App(vent): mix:share (" + mode + ")");
|
||||
if (mode === "facebook") {
|
||||
social.sharePageToFacebook(model);
|
||||
} else if (mode === "twitter") {
|
||||
social.sharePageToTwitter(model);
|
||||
} else if (mode === "embed") {
|
||||
social.generateEmbedCode(model);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -71,12 +71,12 @@ define ['app', 'marionette', 'vent',
|
||||
showUserFavourites: (slug) ->
|
||||
console.log("Controller: showUserFavourites")
|
||||
@_showMixList()
|
||||
vent.trigger("mix:showlist", {order_by: 'latest', type: 'favourites', user: slug})
|
||||
vent.trigger("mix:showlist", {order_by: 'latest', favourites__slug: slug})
|
||||
|
||||
showUserLikes: (slug) ->
|
||||
console.log("Controller: showUserLikes")
|
||||
@_showMixList()
|
||||
vent.trigger("mix:showlist", {order_by: 'latest', type: 'likes', user: slug})
|
||||
vent.trigger("mix:showlist", {order_by: 'latest', likes__slug: slug})
|
||||
|
||||
showUserFollowing: (slug) ->
|
||||
console.log("Controller: showUserFollowing")
|
||||
|
||||
@@ -120,8 +120,7 @@
|
||||
this._showMixList();
|
||||
return vent.trigger("mix:showlist", {
|
||||
order_by: 'latest',
|
||||
type: 'favourites',
|
||||
user: slug
|
||||
favourites__slug: slug
|
||||
});
|
||||
};
|
||||
|
||||
@@ -130,8 +129,7 @@
|
||||
this._showMixList();
|
||||
return vent.trigger("mix:showlist", {
|
||||
order_by: 'latest',
|
||||
type: 'likes',
|
||||
user: slug
|
||||
likes__slug: slug
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
39
static/js/app/lib/social.coffee
Normal file
39
static/js/app/lib/social.coffee
Normal file
@@ -0,0 +1,39 @@
|
||||
define ['jquery', 'utils'], ($, utils) ->
|
||||
postFacebookLike: (mixId) ->
|
||||
|
||||
#first off, find if the current user has allowed facebook likes
|
||||
$.getJSON "social/like/" + mixId + "/", (data) ->
|
||||
com.podnoms.utils.showAlert "Posted your like to facebook, you can stop this in your settings page.", "Cheers feen"
|
||||
|
||||
|
||||
generateEmbedCode: (model) ->
|
||||
console.log("Generating embed code");
|
||||
utils.modal "/dlg/embed/" + model.get('slug')
|
||||
|
||||
sharePageToTwitter: (model) ->
|
||||
|
||||
#We get the URL of the link
|
||||
loc = $(this).attr("href")
|
||||
|
||||
#We get the title of the link
|
||||
title = $(this).attr("title")
|
||||
|
||||
#We trigger a new window with the Twitter dialog, in the middle of the page
|
||||
window.open "http://twitter.com/share?url=" + "http://" + window.location.host + "/" + model.get("item_url") + "&text=" + model.get("title"), "twitterwindow", "height=450, width=550, top=" + ($(window).height() / 2 - 225) + ", left=" + $(window).width() / 2 + ", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0"
|
||||
|
||||
sharePageToFacebook: (model) ->
|
||||
FB.ui
|
||||
method: "feed"
|
||||
name: "Check out this mix on Deep South Sounds"
|
||||
display: "popup"
|
||||
link: "http://" + window.location.host + "/" + model.get("item_url")
|
||||
picture: model.get("mix_image")
|
||||
caption: model.get("title")
|
||||
description: model.get("description")
|
||||
, (response) ->
|
||||
if response and response.post_id
|
||||
com.podnoms.utils.showAlert "Success", "Post shared to facebook"
|
||||
else
|
||||
com.podnoms.utils.showError "Error", "Failure sharing post"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Generated by CoffeeScript 1.3.3
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
(function() {
|
||||
|
||||
define(['jquery', 'bootstrap', 'toastr'], function($, bootstrap, toastr) {
|
||||
var _this = this;
|
||||
|
||||
return {
|
||||
modal: function(url) {
|
||||
if (url) {
|
||||
@@ -24,6 +24,7 @@
|
||||
},
|
||||
checkPlayCount: function() {
|
||||
var _this = this;
|
||||
|
||||
if (document.cookie.indexOf("sessionId")) {
|
||||
$.getJSON("/ajax/session_play_count", function(data) {
|
||||
console.log("utils: got playcount");
|
||||
@@ -46,6 +47,7 @@
|
||||
generateGuid: function() {
|
||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
||||
var r, v;
|
||||
|
||||
r = Math.random() * 16 | 0;
|
||||
v = (c === "x" ? r : r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
@@ -53,6 +55,7 @@
|
||||
},
|
||||
downloadURL: function(url) {
|
||||
var iframe;
|
||||
|
||||
iframe = document.getElementById("hiddenDownloader");
|
||||
if (iframe === null) {
|
||||
iframe = document.createElement("iframe");
|
||||
|
||||
@@ -8,4 +8,3 @@ define ['backbone', 'models/mix/mixItem', 'app.lib/backbone.dss.model.collection
|
||||
console.log("MixCollection: parse")
|
||||
|
||||
MixCollection
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
// Generated by CoffeeScript 1.3.3
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
(function() {
|
||||
var __hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
define(['backbone', 'models/mix/mixItem', 'app.lib/backbone.dss.model.collection'], function(Backbone, MixItem, DssCollection) {
|
||||
var MixCollection;
|
||||
MixCollection = (function(_super) {
|
||||
var MixCollection, _ref;
|
||||
|
||||
MixCollection = (function(_super) {
|
||||
__extends(MixCollection, _super);
|
||||
|
||||
function MixCollection() {
|
||||
return MixCollection.__super__.constructor.apply(this, arguments);
|
||||
_ref = MixCollection.__super__.constructor.apply(this, arguments);
|
||||
return _ref;
|
||||
}
|
||||
|
||||
MixCollection.prototype.model = MixItem;
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/** @license
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
Copyright (c) 2012, Fergal Moran. All rights reserved.
|
||||
Code provided under the BSD License:
|
||||
|
||||
*/
|
||||
|
||||
social = {
|
||||
postFacebookLike: function (mixId) {
|
||||
//first off, find if the current user has allowed facebook likes
|
||||
$.getJSON(
|
||||
'social/like/' + mixId + '/',
|
||||
function (data) {
|
||||
com.podnoms.utils.showAlert("Posted your like to facebook, you can stop this in your settings page.", "Cheers feen");
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
postFacebookFavourite: function (mixId) {
|
||||
|
||||
},
|
||||
|
||||
sharePageToTwitter: function (model) {
|
||||
//We get the URL of the link
|
||||
var loc = $(this).attr('href');
|
||||
|
||||
//We get the title of the link
|
||||
var title = $(this).attr('title');
|
||||
|
||||
//We trigger a new window with the Twitter dialog, in the middle of the page
|
||||
window.open(
|
||||
'http://twitter.com/share?url=' + 'http://' + window.location.host + "/" + model.get('item_url') +
|
||||
'&text=' + model.get('title'),
|
||||
'twitterwindow',
|
||||
'height=450, width=550, top=' + ($(window).height() / 2 - 225) +
|
||||
', left=' + $(window).width() / 2 +
|
||||
', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
|
||||
},
|
||||
sharePageToFacebook: function (model) {
|
||||
FB.ui({
|
||||
method: 'feed',
|
||||
name: 'Check out this mix on Deep South Sounds',
|
||||
display: 'popup',
|
||||
link: 'http://' + window.location.host + "/" + model.get('item_url'),
|
||||
picture: model.get('mix_image'),
|
||||
caption: model.get('title'),
|
||||
description: model.get('description')
|
||||
},
|
||||
function (response) {
|
||||
if (response && response.post_id) {
|
||||
com.podnoms.utils.showAlert("Success", "Post shared to facebook");
|
||||
} else {
|
||||
com.podnoms.utils.showError("Error", "Failure sharing post");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -31,7 +31,7 @@ define ['moment', 'app', 'vent', 'marionette', 'utils', 'models/comment/commentC
|
||||
id = @model.get('id')
|
||||
if @model.get('duration')
|
||||
totalDuration = moment.duration(this.model.get('duration'), "seconds")
|
||||
totalDurationText = if totalDuration.hours() != 0 then moment(totalDuration).format("HH:mm:ss") else moment(totalDuration).format("mm:ss");
|
||||
totalDurationText = if totalDuration.hours() != 0 then moment(totalDuration).format("h:mm:ss") else moment(totalDuration).format("mm:ss");
|
||||
$('#player-duration-' + id, this.el).text(totalDurationText)
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
// Generated by CoffeeScript 1.3.3
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
(function() {
|
||||
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
define(['moment', 'app', 'vent', 'marionette', 'utils', 'models/comment/commentCollection', 'views/comment/commentListView', 'text!/tpl/MixListItemView'], function(moment, App, vent, Marionette, utils, CommentsCollection, CommentsListView, Template) {
|
||||
var MixItemView;
|
||||
MixItemView = (function(_super) {
|
||||
var MixItemView, _ref;
|
||||
|
||||
MixItemView = (function(_super) {
|
||||
__extends(MixItemView, _super);
|
||||
|
||||
function MixItemView() {
|
||||
this.doStart = __bind(this.doStart, this);
|
||||
|
||||
this.renderComments = __bind(this.renderComments, this);
|
||||
|
||||
this.renderGenres = __bind(this.renderGenres, this);
|
||||
|
||||
this.onRender = __bind(this.onRender, this);
|
||||
|
||||
this.initialize = __bind(this.initialize, this);
|
||||
return MixItemView.__super__.constructor.apply(this, arguments);
|
||||
this.initialize = __bind(this.initialize, this); _ref = MixItemView.__super__.constructor.apply(this, arguments);
|
||||
return _ref;
|
||||
}
|
||||
|
||||
MixItemView.prototype.template = _.template(Template);
|
||||
@@ -54,10 +50,11 @@
|
||||
|
||||
MixItemView.prototype.onRender = function() {
|
||||
var id, totalDuration, totalDurationText;
|
||||
|
||||
id = this.model.get('id');
|
||||
if (this.model.get('duration')) {
|
||||
totalDuration = moment.duration(this.model.get('duration'), "seconds");
|
||||
totalDurationText = totalDuration.hours() !== 0 ? moment(totalDuration).format("HH:mm:ss") : moment(totalDuration).format("mm:ss");
|
||||
totalDurationText = totalDuration.hours() !== 0 ? moment(totalDuration).format("h:mm:ss") : moment(totalDuration).format("mm:ss");
|
||||
$('#player-duration-' + id, this.el).text(totalDurationText);
|
||||
}
|
||||
this.renderGenres();
|
||||
@@ -73,6 +70,7 @@
|
||||
|
||||
MixItemView.prototype.renderGenres = function() {
|
||||
var el;
|
||||
|
||||
el = this.el;
|
||||
$.each(this.model.get("genre-list"), function(data) {
|
||||
$("#genre-list", el).append('<a href="/mixes/' + this.slug + '" class="label label-info">' + this.text + '</a>');
|
||||
@@ -83,6 +81,7 @@
|
||||
|
||||
MixItemView.prototype.renderComments = function() {
|
||||
var comments;
|
||||
|
||||
comments = new CommentsCollection();
|
||||
comments.url = this.model.get("resource_uri") + "comments/";
|
||||
comments.mix_id = this.model.id;
|
||||
@@ -90,6 +89,7 @@
|
||||
comments.fetch({
|
||||
success: function(data) {
|
||||
var content;
|
||||
|
||||
console.log(data);
|
||||
content = new CommentsListView({
|
||||
collection: comments
|
||||
@@ -139,6 +139,7 @@
|
||||
|
||||
MixItemView.prototype.mixFavourite = function() {
|
||||
var app;
|
||||
|
||||
console.log("MixItemView: favouriteMix");
|
||||
app = require('app');
|
||||
vent.trigger("mix:favourite", this.model);
|
||||
@@ -153,6 +154,7 @@
|
||||
|
||||
MixItemView.prototype.mixShare = function(e) {
|
||||
var mode;
|
||||
|
||||
console.log("MixItemView: shareMix");
|
||||
mode = $(e.currentTarget).data("mode");
|
||||
console.log("MixItemView: " + mode);
|
||||
|
||||
196
static/js/jwplayer.html5.js
Normal file
196
static/js/jwplayer.html5.js
Normal file
File diff suppressed because one or more lines are too long
80
static/js/jwplayer.js
Normal file
80
static/js/jwplayer.js
Normal file
@@ -0,0 +1,80 @@
|
||||
"undefined"==typeof jwplayer&&(jwplayer=function(f){if(jwplayer.api)return jwplayer.api.selectPlayer(f)},jwplayer.version="6.5.3609",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),function(f){function a(h){return function(){return d(h)}}var k=document,e=window,c=navigator,b=f.utils=function(){};b.exists=function(h){switch(typeof h){case "string":return 0<h.length;case "object":return null!==h;case "undefined":return!1}return!0};
|
||||
b.styleDimension=function(h){return h+(0<h.toString().indexOf("%")?"":"px")};b.getAbsolutePath=function(h,a){b.exists(a)||(a=k.location.href);if(b.exists(h)){var d;if(b.exists(h)){d=h.indexOf("://");var c=h.indexOf("?");d=0<d&&(0>c||c>d)}else d=void 0;if(d)return h;d=a.substring(0,a.indexOf("://")+3);var c=a.substring(d.length,a.indexOf("/",d.length+1)),e;0===h.indexOf("/")?e=h.split("/"):(e=a.split("?")[0],e=e.substring(d.length+c.length+1,e.lastIndexOf("/")),e=e.split("/").concat(h.split("/")));
|
||||
for(var g=[],m=0;m<e.length;m++)e[m]&&(b.exists(e[m])&&"."!=e[m])&&(".."==e[m]?g.pop():g.push(e[m]));return d+c+"/"+g.join("/")}};b.extend=function(){var a=b.extend.arguments;if(1<a.length){for(var d=1;d<a.length;d++)b.foreach(a[d],function(d,c){try{b.exists(c)&&(a[0][d]=c)}catch(e){}});return a[0]}return null};b.log=function(a,b){"undefined"!=typeof console&&"undefined"!=typeof console.log&&(b?console.log(a,b):console.log(a))};var d=b.userAgentMatch=function(a){return null!==c.userAgent.toLowerCase().match(a)};
|
||||
b.isIE=a(/msie/i);b.isFF=a(/firefox/i);b.isChrome=a(/chrome/i);b.isIOS=a(/iP(hone|ad|od)/i);b.isIPod=a(/iP(hone|od)/i);b.isIPad=a(/iPad/i);b.isSafari602=a(/Macintosh.*Mac OS X 10_8.*6\.0\.\d* Safari/i);b.isAndroid=function(a){return a?d(RegExp("android.*"+a,"i")):d(/android/i)};b.isMobile=function(){return b.isIOS()||b.isAndroid()};b.saveCookie=function(a,b){k.cookie="jwplayer."+a+"\x3d"+b+"; path\x3d/"};b.getCookies=function(){for(var a={},b=k.cookie.split("; "),d=0;d<b.length;d++){var c=b[d].split("\x3d");
|
||||
0==c[0].indexOf("jwplayer.")&&(a[c[0].substring(9,c[0].length)]=c[1])}return a};b.typeOf=function(a){var b=typeof a;return"object"===b?!a?"null":a instanceof Array?"array":b:b};b.translateEventResponse=function(a,d){var c=b.extend({},d);a==f.events.JWPLAYER_FULLSCREEN&&!c.fullscreen?(c.fullscreen="true"==c.message?!0:!1,delete c.message):"object"==typeof c.data?(c=b.extend(c,c.data),delete c.data):"object"==typeof c.metadata&&b.deepReplaceKeyName(c.metadata,["__dot__","__spc__","__dsh__","__default__"],
|
||||
["."," ","-","default"]);b.foreach(["position","duration","offset"],function(a,b){c[b]&&(c[b]=Math.round(1E3*c[b])/1E3)});return c};b.flashVersion=function(){if(b.isAndroid())return 0;var a=c.plugins,d;try{if("undefined"!==a&&(d=a["Shockwave Flash"]))return parseInt(d.description.replace(/\D+(\d+)\..*/,"$1"))}catch(n){}if("undefined"!=typeof e.ActiveXObject)try{if(d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(d.GetVariable("$version").split(" ")[1].split(",")[0])}catch(f){}return 0};
|
||||
b.getScriptPath=function(a){for(var b=k.getElementsByTagName("script"),d=0;d<b.length;d++){var c=b[d].src;if(c&&0<=c.indexOf(a))return c.substr(0,c.indexOf(a))}return""};b.deepReplaceKeyName=function(a,d,c){switch(f.utils.typeOf(a)){case "array":for(var e=0;e<a.length;e++)a[e]=f.utils.deepReplaceKeyName(a[e],d,c);break;case "object":b.foreach(a,function(b,g){var e;if(d instanceof Array&&c instanceof Array){if(d.length!=c.length)return;e=d}else e=[d];for(var n=b,k=0;k<e.length;k++)n=n.replace(RegExp(d[k],
|
||||
"g"),c[k]);a[n]=f.utils.deepReplaceKeyName(g,d,c);b!=n&&delete a[b]})}return a};var n=b.pluginPathType={ABSOLUTE:0,RELATIVE:1,CDN:2};b.getPluginPathType=function(a){if("string"==typeof a){a=a.split("?")[0];var d=a.indexOf("://");if(0<d)return n.ABSOLUTE;var c=a.indexOf("/");a=b.extension(a);return 0>d&&0>c&&(!a||!isNaN(a))?n.CDN:n.RELATIVE}};b.getPluginName=function(a){return a.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")};b.getPluginVersion=function(a){return a.replace(/[^-]*-?([^\.]*).*$/,"$1")};
|
||||
b.isYouTube=function(a){return-1<a.indexOf("youtube.com")||-1<a.indexOf("youtu.be")};b.isRtmp=function(a,b){return 0==a.indexOf("rtmp")||"rtmp"==b};b.foreach=function(a,b){var d,c;for(d in a)a.hasOwnProperty(d)&&(c=a[d],b(d,c))};b.isHTTPS=function(){return 0==e.location.href.indexOf("https")};b.repo=function(){var a="http://p.jwpcdn.com/"+f.version.split(/\W/).splice(0,2).join("/")+"/";try{b.isHTTPS()&&(a=a.replace("http://","https://ssl."))}catch(d){}return a}}(jwplayer),function(f){var a="video/",
|
||||
k=f.foreach,e={mp4:a+"mp4",vorbis:"audio/ogg",ogg:a+"ogg",webm:a+"webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},c={mp4:e.mp4,f4v:e.mp4,m4v:e.mp4,mov:e.mp4,m4a:e.aac,f4a:e.aac,aac:e.aac,mp3:e.mp3,ogv:e.ogg,ogg:e.vorbis,oga:e.vorbis,webm:e.webm,m3u8:e.hls,hls:e.hls},a="video",a={flv:a,f4v:a,mov:a,m4a:a,m4v:a,mp4:a,aac:a,f4a:a,mp3:"sound",smil:"rtmp",m3u8:"hls",hls:"hls"},b=f.extensionmap={};k(c,function(a,c){b[a]={html5:c}});k(a,function(a,c){b[a]||(b[a]={});b[a].flash=
|
||||
c});b.types=e;b.mimeType=function(a){var b;k(e,function(c,e){!b&&e==a&&(b=c)});return b};b.extType=function(a){return b.mimeType(c[a])}}(jwplayer.utils),function(f){var a=f.loaderstatus={NEW:0,LOADING:1,ERROR:2,COMPLETE:3},k=document;f.scriptloader=function(e){function c(){d=a.ERROR;h.sendEvent(n.ERROR)}function b(){d=a.COMPLETE;h.sendEvent(n.COMPLETE)}var d=a.NEW,n=jwplayer.events,h=new n.eventdispatcher;f.extend(this,h);this.load=function(){var h=f.scriptloader.loaders[e];if(h&&(h.getStatus()==
|
||||
a.NEW||h.getStatus()==a.LOADING))h.addEventListener(n.ERROR,c),h.addEventListener(n.COMPLETE,b);else if(f.scriptloader.loaders[e]=this,d==a.NEW){d=a.LOADING;var p=k.createElement("script");p.addEventListener?(p.onload=b,p.onerror=c):p.readyState&&(p.onreadystatechange=function(){("loaded"==p.readyState||"complete"==p.readyState)&&b()});k.getElementsByTagName("head")[0].appendChild(p);p.src=e}};this.getStatus=function(){return d}};f.scriptloader.loaders={}}(jwplayer.utils),function(f){f.trim=function(a){return a.replace(/^\s*/,
|
||||
"").replace(/\s*$/,"")};f.pad=function(a,f,e){for(e||(e="0");a.length<f;)a=e+a;return a};f.xmlAttribute=function(a,f){for(var e=0;e<a.attributes.length;e++)if(a.attributes[e].name&&a.attributes[e].name.toLowerCase()==f.toLowerCase())return a.attributes[e].value.toString();return""};f.extension=function(a){if(!a||"rtmp"==a.substr(0,4))return"";a=a.substring(a.lastIndexOf("/")+1,a.length).split("?")[0].split("#")[0];if(-1<a.lastIndexOf("."))return a.substr(a.lastIndexOf(".")+1,a.length).toLowerCase()};
|
||||
f.stringToColor=function(a){a=a.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");3==a.length&&(a=a.charAt(0)+a.charAt(0)+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2));return parseInt(a,16)}}(jwplayer.utils),function(f){f.key=function(a){var k,e,c;this.edition=function(){return c&&c.getTime()<(new Date).getTime()?"invalid":k};this.token=function(){return e};f.exists(a)||(a="");try{a=f.tea.decrypt(a,"36QXq4W@GSBV^teR");var b=a.split("/");(k=b[0])?/^(free|pro|premium|ads)$/i.test(k)?(e=b[1],b[2]&&0<parseInt(b[2])&&
|
||||
(c=new Date,c.setTime(String(b[2])))):k="invalid":k="free"}catch(d){k="invalid"}}}(jwplayer.utils),function(f){var a=f.tea={};a.encrypt=function(c,b){if(0==c.length)return"";var d=a.strToLongs(e.encode(c));1>=d.length&&(d[1]=0);for(var n=a.strToLongs(e.encode(b).slice(0,16)),h=d.length,f=d[h-1],p=d[0],q,j=Math.floor(6+52/h),g=0;0<j--;){g+=2654435769;q=g>>>2&3;for(var m=0;m<h;m++)p=d[(m+1)%h],f=(f>>>5^p<<2)+(p>>>3^f<<4)^(g^p)+(n[m&3^q]^f),f=d[m]+=f}d=a.longsToStr(d);return k.encode(d)};a.decrypt=function(c,
|
||||
b){if(0==c.length)return"";for(var d=a.strToLongs(k.decode(c)),n=a.strToLongs(e.encode(b).slice(0,16)),h=d.length,f=d[h-1],p=d[0],q,j=2654435769*Math.floor(6+52/h);0!=j;){q=j>>>2&3;for(var g=h-1;0<=g;g--)f=d[0<g?g-1:h-1],f=(f>>>5^p<<2)+(p>>>3^f<<4)^(j^p)+(n[g&3^q]^f),p=d[g]-=f;j-=2654435769}d=a.longsToStr(d);d=d.replace(/\0+$/,"");return e.decode(d)};a.strToLongs=function(a){for(var b=Array(Math.ceil(a.length/4)),d=0;d<b.length;d++)b[d]=a.charCodeAt(4*d)+(a.charCodeAt(4*d+1)<<8)+(a.charCodeAt(4*d+
|
||||
2)<<16)+(a.charCodeAt(4*d+3)<<24);return b};a.longsToStr=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]&255,a[d]>>>8&255,a[d]>>>16&255,a[d]>>>24&255);return b.join("")};var k={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var d,n,h,f,p=[],q="",j,g,m=k.code;g=("undefined"==typeof b?0:b)?e.encode(a):a;j=g.length%3;if(0<j)for(;3>j++;)q+="\x3d",g+="\x00";for(j=0;j<g.length;j+=3)d=g.charCodeAt(j),n=g.charCodeAt(j+
|
||||
1),h=g.charCodeAt(j+2),f=d<<16|n<<8|h,d=f>>18&63,n=f>>12&63,h=f>>6&63,f&=63,p[j/3]=m.charAt(d)+m.charAt(n)+m.charAt(h)+m.charAt(f);p=p.join("");return p=p.slice(0,p.length-q.length)+q},decode:function(a,b){b="undefined"==typeof b?!1:b;var d,f,h,r,p,q=[],j,g=k.code;j=b?e.decode(a):a;for(var m=0;m<j.length;m+=4)d=g.indexOf(j.charAt(m)),f=g.indexOf(j.charAt(m+1)),r=g.indexOf(j.charAt(m+2)),p=g.indexOf(j.charAt(m+3)),h=d<<18|f<<12|r<<6|p,d=h>>>16&255,f=h>>>8&255,h&=255,q[m/4]=String.fromCharCode(d,f,
|
||||
h),64==p&&(q[m/4]=String.fromCharCode(d,f)),64==r&&(q[m/4]=String.fromCharCode(d));r=q.join("");return b?e.decode(r):r}},e={encode:function(a){a=a.replace(/[\u0080-\u07ff]/g,function(a){a=a.charCodeAt(0);return String.fromCharCode(192|a>>6,128|a&63)});return a=a.replace(/[\u0800-\uffff]/g,function(a){a=a.charCodeAt(0);return String.fromCharCode(224|a>>12,128|a>>6&63,128|a&63)})},decode:function(a){a=a.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(a){a=(a.charCodeAt(0)&15)<<12|
|
||||
(a.charCodeAt(1)&63)<<6|a.charCodeAt(2)&63;return String.fromCharCode(a)});return a=a.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(a){a=(a.charCodeAt(0)&31)<<6|a.charCodeAt(1)&63;return String.fromCharCode(a)})}}}(jwplayer.utils),function(f){f.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",
|
||||
JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",
|
||||
JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",
|
||||
JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError",JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions"}}(jwplayer),function(f){var a=jwplayer.utils;f.eventdispatcher=function(f,
|
||||
e){var c,b;this.resetEventListeners=function(){c={};b=[]};this.resetEventListeners();this.addEventListener=function(b,e,h){try{a.exists(c[b])||(c[b]=[]),"string"==a.typeOf(e)&&(e=(new Function("return "+e))()),c[b].push({listener:e,count:h})}catch(f){a.log("error",f)}return!1};this.removeEventListener=function(b,e){if(c[b]){try{for(var h=0;h<c[b].length;h++)if(c[b][h].listener.toString()==e.toString()){c[b].splice(h,1);break}}catch(f){a.log("error",f)}return!1}};this.addGlobalListener=function(d,
|
||||
c){try{"string"==a.typeOf(d)&&(d=(new Function("return "+d))()),b.push({listener:d,count:c})}catch(e){a.log("error",e)}return!1};this.removeGlobalListener=function(d){if(d){try{for(var c=0;c<b.length;c++)if(b[c].listener.toString()==d.toString()){b.splice(c,1);break}}catch(e){a.log("error",e)}return!1}};this.sendEvent=function(d,n){a.exists(n)||(n={});a.extend(n,{id:f,version:jwplayer.version,type:d});e&&a.log(d,n);if("undefined"!=a.typeOf(c[d]))for(var h=0;h<c[d].length;h++){try{c[d][h].listener(n)}catch(r){a.log("There was an error while handling a listener: "+
|
||||
r.toString(),c[d][h].listener)}c[d][h]&&(1===c[d][h].count?delete c[d][h]:0<c[d][h].count&&(c[d][h].count-=1))}for(h=0;h<b.length;h++){try{b[h].listener(n)}catch(p){a.log("There was an error while handling a listener: "+p.toString(),b[h].listener)}b[h]&&(1===b[h].count?delete b[h]:0<b[h].count&&(b[h].count-=1))}}}}(jwplayer.events),function(f){var a={},k={};f.plugins=function(){};f.plugins.loadPlugins=function(e,c){k[e]=new f.plugins.pluginloader(new f.plugins.model(a),c);return k[e]};f.plugins.registerPlugin=
|
||||
function(e,c,b,d){var n=f.utils.getPluginName(e);a[n]||(a[n]=new f.plugins.plugin(e));a[n].registerPlugin(e,c,b,d)}}(jwplayer),function(f){f.plugins.model=function(a){this.addPlugin=function(k){var e=f.utils.getPluginName(k);a[e]||(a[e]=new f.plugins.plugin(k));return a[e]};this.getPlugins=function(){return a}}}(jwplayer),function(f){var a=jwplayer.utils,k=jwplayer.events;f.pluginmodes={FLASH:0,JAVASCRIPT:1,HYBRID:2};f.plugin=function(e){function c(){switch(a.getPluginPathType(e)){case a.pluginPathType.ABSOLUTE:return e;
|
||||
case a.pluginPathType.RELATIVE:return a.getAbsolutePath(e,window.location.href)}}function b(){q=setTimeout(function(){n=a.loaderstatus.COMPLETE;j.sendEvent(k.COMPLETE)},1E3)}function d(){n=a.loaderstatus.ERROR;j.sendEvent(k.ERROR)}var n=a.loaderstatus.NEW,h,r,p,q,j=new k.eventdispatcher;a.extend(this,j);this.load=function(){if(n==a.loaderstatus.NEW)if(0<e.lastIndexOf(".swf"))h=e,n=a.loaderstatus.COMPLETE,j.sendEvent(k.COMPLETE);else if(a.getPluginPathType(e)==a.pluginPathType.CDN)n=a.loaderstatus.COMPLETE,
|
||||
j.sendEvent(k.COMPLETE);else{n=a.loaderstatus.LOADING;var g=new a.scriptloader(c());g.addEventListener(k.COMPLETE,b);g.addEventListener(k.ERROR,d);g.load()}};this.registerPlugin=function(b,d,c,e){q&&(clearTimeout(q),q=void 0);p=d;c&&e?(h=e,r=c):"string"==typeof c?h=c:"function"==typeof c?r=c:!c&&!e&&(h=b);n=a.loaderstatus.COMPLETE;j.sendEvent(k.COMPLETE)};this.getStatus=function(){return n};this.getPluginName=function(){return a.getPluginName(e)};this.getFlashPath=function(){if(h)switch(a.getPluginPathType(h)){case a.pluginPathType.ABSOLUTE:return h;
|
||||
case a.pluginPathType.RELATIVE:return 0<e.lastIndexOf(".swf")?a.getAbsolutePath(h,window.location.href):a.getAbsolutePath(h,c())}return null};this.getJS=function(){return r};this.getTarget=function(){return p};this.getPluginmode=function(){if("undefined"!=typeof h&&"undefined"!=typeof r)return f.pluginmodes.HYBRID;if("undefined"!=typeof h)return f.pluginmodes.FLASH;if("undefined"!=typeof r)return f.pluginmodes.JAVASCRIPT};this.getNewInstance=function(a,b,d){return new r(a,b,d)};this.getURL=function(){return e}}}(jwplayer.plugins),
|
||||
function(f){var a=f.utils,k=f.events,e=a.foreach;f.plugins.pluginloader=function(c,b){function d(){p?g.sendEvent(k.ERROR,{message:q}):r||(r=!0,h=a.loaderstatus.COMPLETE,g.sendEvent(k.COMPLETE))}function n(){j||d();if(!r&&!p){var b=0,e=c.getPlugins();a.foreach(j,function(c){c=a.getPluginName(c);var g=e[c];c=g.getJS();var h=g.getTarget(),g=g.getStatus();if(g==a.loaderstatus.LOADING||g==a.loaderstatus.NEW)b++;else if(c&&(!h||parseFloat(h)>parseFloat(f.version)))p=!0,q="Incompatible player version",d()});
|
||||
0==b&&d()}}var h=a.loaderstatus.NEW,r=!1,p=!1,q,j=b,g=new k.eventdispatcher;a.extend(this,g);this.setupPlugins=function(b,d,g){var h={length:0,plugins:{}},m=0,f={},j=c.getPlugins();e(d.plugins,function(c,e){var A=a.getPluginName(c),n=j[A],k=n.getFlashPath(),p=n.getJS(),q=n.getURL();k&&(h.plugins[k]=a.extend({},e),h.plugins[k].pluginmode=n.getPluginmode(),h.length++);try{if(p&&d.plugins&&d.plugins[q]){var r=document.createElement("div");r.id=b.id+"_"+A;r.style.position="absolute";r.style.top=0;r.style.zIndex=
|
||||
m+10;f[A]=n.getNewInstance(b,a.extend({},d.plugins[q]),r);m++;b.onReady(g(f[A],r,!0));b.onResize(g(f[A],r))}}catch(E){a.log("ERROR: Failed to load "+A+".")}});b.plugins=f;return h};this.load=function(){if(!(a.exists(b)&&"object"!=a.typeOf(b))){h=a.loaderstatus.LOADING;e(b,function(b){a.exists(b)&&(b=c.addPlugin(b),b.addEventListener(k.COMPLETE,n),b.addEventListener(k.ERROR,m))});var d=c.getPlugins();e(d,function(a,b){b.load()})}n()};var m=this.pluginFailed=function(){p||(p=!0,q="File not found",d())};
|
||||
this.getStatus=function(){return h}}}(jwplayer),function(f){f.playlist=function(a){var k=[];if("array"==f.utils.typeOf(a))for(var e=0;e<a.length;e++)k.push(new f.playlist.item(a[e]));else k.push(new f.playlist.item(a));return k}}(jwplayer),function(f){var a=f.item=function(k){var e=jwplayer.utils,c=e.extend({},a.defaults,k);c.tracks=e.exists(k.tracks)?k.tracks:[];0==c.sources.length&&(c.sources=[new f.source(c)]);for(var b=0;b<c.sources.length;b++){var d=c.sources[b]["default"];c.sources[b]["default"]=
|
||||
d?"true"==d.toString():!1;c.sources[b]=new f.source(c.sources[b])}if(c.captions&&!e.exists(k.tracks)){for(k=0;k<c.captions.length;k++)c.tracks.push(c.captions[k]);delete c.captions}for(b=0;b<c.tracks.length;b++)c.tracks[b]=new f.track(c.tracks[b]);return c};a.defaults={description:"",image:"",mediaid:"",title:"",sources:[],tracks:[]}}(jwplayer.playlist),function(f){var a=jwplayer.utils,k={file:void 0,label:void 0,type:void 0,"default":void 0};f.source=function(e){var c=a.extend({},k);a.foreach(k,
|
||||
function(b){a.exists(e[b])&&(c[b]=e[b],delete e[b])});c.type&&0<c.type.indexOf("/")&&(c.type=a.extensionmap.mimeType(c.type));"m3u8"==c.type&&(c.type="hls");"smil"==c.type&&(c.type="rtmp");return c}}(jwplayer.playlist),function(f){var a=jwplayer.utils,k={file:void 0,label:void 0,kind:"captions","default":!1};f.track=function(e){var c=a.extend({},k);e||(e={});a.foreach(k,function(b){a.exists(e[b])&&(c[b]=e[b],delete e[b])});return c}}(jwplayer.playlist),function(f){var a=f.utils,k=f.events,e=!0,c=
|
||||
!1,b=document,d=f.embed=function(n){function h(b,d){a.foreach(d,function(a,d){"function"==typeof b[a]&&b[a].call(b,d)})}function r(a){j(l,B+a.message)}function p(){j(l,B+"No playable sources found")}function q(){j(l,"Adobe SiteCatalyst Error: Could not find Media Module")}function j(b,d){if(m.fallback){var h=b.style;h.backgroundColor="#000";h.color="#FFF";h.width=a.styleDimension(m.width);h.height=a.styleDimension(m.height);h.display="table";h.opacity=1;var h=document.createElement("p"),f=h.style;
|
||||
f.verticalAlign="middle";f.textAlign="center";f.display="table-cell";f.font="15px/20px Arial, Helvetica, sans-serif";h.innerHTML=d.replace(":",":\x3cbr\x3e");b.innerHTML="";b.appendChild(h);g(d,e)}else g(d,c)}function g(a,b){x&&(clearTimeout(x),x=null);n.dispatchEvent(k.JWPLAYER_SETUP_ERROR,{message:a,fallback:b})}var m=new d.config(n.config),l,t,u,w=m.width,z=m.height,B="Error loading player: ",y=f.plugins.loadPlugins(n.id,m.plugins),x=null;m.fallbackDiv&&(u=m.fallbackDiv,delete m.fallbackDiv);m.id=
|
||||
n.id;t=b.getElementById(n.id);m.aspectratio?n.config.aspectratio=m.aspectratio:delete n.config.aspectratio;l=b.createElement("div");l.id=t.id;l.style.width=0<w.toString().indexOf("%")?w:w+"px";l.style.height=0<z.toString().indexOf("%")?z:z+"px";t.parentNode.replaceChild(l,t);f.embed.errorScreen=j;y.addEventListener(k.COMPLETE,function(){if(m.sitecatalyst)try{null!=s&&s.hasOwnProperty("Media")||q()}catch(b){q();return}if("array"==a.typeOf(m.playlist)&&2>m.playlist.length&&(0==m.playlist.length||!m.playlist[0].sources||
|
||||
0==m.playlist[0].sources.length))p();else if(y.getStatus()==a.loaderstatus.COMPLETE){for(var f=0;f<m.modes.length;f++)if(m.modes[f].type&&d[m.modes[f].type]){var j=a.extend({},m),D=new d[m.modes[f].type](l,m.modes[f],j,y,n);if(D.supportsConfig())return D.addEventListener(k.ERROR,r),D.embed(),h(n,j.events),n}if(m.fallback){var t="No suitable players found and fallback enabled";x=setTimeout(function(){g(t,e)},10);a.log(t);new d.download(l,m,p)}else t="No suitable players found and fallback disabled",
|
||||
g(t,c),a.log(t),l.parentNode.replaceChild(u,l)}});y.addEventListener(k.ERROR,function(a){j(l,"Could not load plugins: "+a.message)});y.load();return n}}(jwplayer),function(f){function a(a){if(a.playlist)for(var d=0;d<a.playlist.length;d++)a.playlist[d]=new c(a.playlist[d]);else{var f={};e.foreach(c.defaults,function(d){k(a,f,d)});f.sources||(a.levels?(f.sources=a.levels,delete a.levels):(d={},k(a,d,"file"),k(a,d,"type"),f.sources=d.file?[d]:[]));a.playlist=[new c(f)]}}function k(a,d,c){e.exists(a[c])&&
|
||||
(d[c]=a[c],delete a[c])}var e=f.utils,c=f.playlist.item;(f.embed.config=function(b){var d={fallback:!0,height:270,primary:"html5",width:480,base:b.base?b.base:e.getScriptPath("jwplayer.js"),aspectratio:""};b=e.extend(d,f.defaults,b);var d={type:"html5",src:b.base+"jwplayer.html5.js"},c={type:"flash",src:b.base+"jwplayer.flash.swf"};b.modes="flash"==b.primary?[c,d]:[d,c];b.listbar&&(b.playlistsize=b.listbar.size,b.playlistposition=b.listbar.position);b.flashplayer&&(c.src=b.flashplayer);b.html5player&&
|
||||
(d.src=b.html5player);a(b);c=b.aspectratio;if("string"!=typeof c||!e.exists(c))d=0;else{var h=c.indexOf(":");-1==h?d=0:(d=parseFloat(c.substr(0,h)),c=parseFloat(c.substr(h+1)),d=0>=d||0>=c?0:100*(c/d)+"%")}-1==b.width.toString().indexOf("%")?delete b.aspectratio:d?b.aspectratio=d:delete b.aspectratio;return b}).addConfig=function(b,c){a(c);return e.extend(b,c)}}(jwplayer),function(f){var a=f.utils,k=document;f.embed.download=function(e,c,b){function d(b,c){for(var d=k.querySelectorAll(b),e=0;e<d.length;e++)a.foreach(c,
|
||||
function(a,b){d[e].style[a]=b})}function f(a,b,c){a=k.createElement(a);b&&(a.className="jwdownload"+b);c&&c.appendChild(a);return a}var h=a.extend({},c),r=h.width?h.width:480,p=h.height?h.height:320,q;c=c.logo?c.logo:{prefix:a.repo(),file:"logo.png",margin:10};var j,g,m,h=h.playlist,l,t=["mp4","aac","mp3"];if(h&&h.length){l=h[0];q=l.sources;for(h=0;h<q.length;h++){var u=q[h],w=u.type?u.type:a.extensionmap.extType(a.extension(u.file));u.file&&a.foreach(t,function(b){w==t[b]?(j=u.file,g=l.image):a.isYouTube(u.file)&&
|
||||
(m=u.file)})}j?(q=j,b=g,e&&(h=f("a","display",e),f("div","icon",h),f("div","logo",h),q&&h.setAttribute("href",a.getAbsolutePath(q))),h="#"+e.id+" .jwdownload",e.style.width="",e.style.height="",d(h+"display",{width:a.styleDimension(Math.max(320,r)),height:a.styleDimension(Math.max(180,p)),background:"black center no-repeat "+(b?"url("+b+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),d(h+"display div",{position:"absolute",width:"100%",height:"100%"}),d(h+"logo",
|
||||
{top:c.margin+"px",right:c.margin+"px",background:"top right no-repeat url("+c.prefix+c.file+")"}),d(h+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgNJREFUeNrs28lqwkAYB/CZqNVDDj2r6FN41QeIy8Fe+gj6BL275Q08u9FbT8ZdwVfotSBYEPUkxFOoks4EKiJdaDuTjMn3wWBO0V/+sySR8SNSqVRKIR8qaXHkzlqS9jCfzzWcTCYp9hF5o+59sVjsiRzcegSckFzcjT+ruN80TeSlAjCAAXzdJSGPFXRpAAMYwACGZQkSdhG4WCzehMNhqV6vG6vVSrirKVEw66YoSqDb7cqlUilE8JjHd/y1MQefVzqdDmiaJpfLZWHgXMHn8F6vJ1cqlVAkEsGuAn83J4gAd2RZymQygX6/L1erVQt+9ZPWb+CDwcCC2zXGJaewl/DhcHhK3DVj+KfKZrMWvFarcYNLomAv4aPRSFZVlTlcSPA5fDweW/BoNIqFnKV53JvncjkLns/n/cLdS+92O7RYLLgsKfv9/t8XlDn4eDyiw+HA9Jyz2eyt0+kY2+3WFC5hluej0Ha7zQQq9PPwdDq1Et1sNsx/nFBgCqWJ8oAK1aUptNVqcYWewE4nahfU0YQnk4ntUEfGMIU2m01HoLaCKbTRaDgKtaVLk9tBYaBcE/6Artdr4RZ5TB6/dC+9iIe/WgAMYADDpAUJAxjAAAYwgGFZgoS/AtNNTF7Z2bL0BYPBV3Jw5xFwwWcYxgtBP5OkE8i9G7aWGOOCruvauwADALMLMEbKf4SdAAAAAElFTkSuQmCC)"})):
|
||||
m?(c=m,e=f("embed","",e),e.src="http://www.youtube.com/v/"+/v=([^&]+)|\/([\w-]+)$|^([\w-]+)$/i.exec(c).slice(1).join(""),e.type="application/x-shockwave-flash",e.width=r,e.height=p):b()}}}(jwplayer),function(f){var a=f.utils,k=f.events,e={};(f.embed.flash=function(c,b,d,n,h){function r(a,b,c){var d=document.createElement("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)}function p(a,b,c){return function(){try{c&&document.getElementById(h.id+"_wrapper").appendChild(b);var d=
|
||||
document.getElementById(h.id).getPluginConfig("display");"function"==typeof a.resize&&a.resize(d.width,d.height);b.style.left=d.x;b.style.top=d.h}catch(e){}}}function q(b){if(!b)return{};var c={},d=[];a.foreach(b,function(b,e){var g=a.getPluginName(b);d.push(b);a.foreach(e,function(a,b){c[g+"."+a]=b})});c.plugins=d.join(",");return c}var j=new f.events.eventdispatcher,g=a.flashVersion();a.extend(this,j);this.embed=function(){d.id=h.id;if(10>g)return j.sendEvent(k.ERROR,{message:"Flash version must be 10.0 or greater"}),
|
||||
!1;var f,l,t=h.config.listbar,u=a.extend({},d);if(c.id+"_wrapper"==c.parentNode.id)f=document.getElementById(c.id+"_wrapper");else{f=document.createElement("div");l=document.createElement("div");l.style.display="none";l.id=c.id+"_aspect";f.id=c.id+"_wrapper";f.style.position="relative";f.style.display="block";f.style.width=a.styleDimension(u.width);f.style.height=a.styleDimension(u.height);if(h.config.aspectratio){var w=parseFloat(h.config.aspectratio);l.style.display="block";l.style.marginTop=h.config.aspectratio;
|
||||
f.style.height="auto";f.style.display="inline-block";t&&("bottom"==t.position?l.style.paddingBottom=t.size+"px":"right"==t.position&&(l.style.marginBottom=-1*t.size*(w/100)+"px"))}c.parentNode.replaceChild(f,c);f.appendChild(c);f.appendChild(l)}f=n.setupPlugins(h,u,p);0<f.length?a.extend(u,q(f.plugins)):delete u.plugins;"undefined"!=typeof u["dock.position"]&&"false"==u["dock.position"].toString().toLowerCase()&&(u.dock=u["dock.position"],delete u["dock.position"]);f=u.wmode?u.wmode:u.height&&40>=
|
||||
u.height?"transparent":"opaque";l="height width modes events primary base fallback volume".split(" ");for(t=0;t<l.length;t++)delete u[l[t]];l=a.getCookies();a.foreach(l,function(a,b){"undefined"==typeof u[a]&&(u[a]=b)});l=window.location.href.split("/");l.splice(l.length-1,1);l=l.join("/");u.base=l+"/";e[c.id]=u;a.isIE()?(l='\x3cobject classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width\x3d"100%" height\x3d"100%"id\x3d"'+c.id+'" name\x3d"'+c.id+'" tabindex\x3d0""\x3e',l+='\x3cparam name\x3d"movie" value\x3d"'+
|
||||
b.src+'"\x3e',l+='\x3cparam name\x3d"allowfullscreen" value\x3d"true"\x3e\x3cparam name\x3d"allowscriptaccess" value\x3d"always"\x3e',l+='\x3cparam name\x3d"seamlesstabbing" value\x3d"true"\x3e',l+='\x3cparam name\x3d"wmode" value\x3d"'+f+'"\x3e',l+='\x3cparam name\x3d"bgcolor" value\x3d"#000000"\x3e',l+="\x3c/object\x3e",c.outerHTML=l,f=document.getElementById(c.id)):(l=document.createElement("object"),l.setAttribute("type","application/x-shockwave-flash"),l.setAttribute("data",b.src),l.setAttribute("width",
|
||||
"100%"),l.setAttribute("height","100%"),l.setAttribute("bgcolor","#000000"),l.setAttribute("id",c.id),l.setAttribute("name",c.id),l.setAttribute("tabindex",0),r(l,"allowfullscreen","true"),r(l,"allowscriptaccess","always"),r(l,"seamlesstabbing","true"),r(l,"wmode",f),c.parentNode.replaceChild(l,c),f=l);h.config.aspectratio&&(f.style.position="absolute");h.container=f;h.setPlayer(f,"flash")};this.supportsConfig=function(){if(g)if(d){if("string"==a.typeOf(d.playlist))return!0;try{var b=d.playlist[0].sources;
|
||||
if("undefined"==typeof b)return!0;for(var c=0;c<b.length;c++){var e;if(e=b[c].file){var f=b[c].file,h=b[c].type;if(a.isYouTube(f)||a.isRtmp(f,h)||"hls"==h)e=!0;else{var j=a.extensionmap[h?h:a.extension(f)];e=!j?!1:!!j.flash}}if(e)return!0}}catch(k){}}else return!0;return!1}}).getVars=function(a){return e[a]}}(jwplayer),function(f){var a=f.utils,k=a.extensionmap,e=f.events;f.embed.html5=function(c,b,d,n,h){function r(a,b,d){return function(){try{var e=document.querySelector("#"+c.id+" .jwmain");d&&
|
||||
e.appendChild(b);"function"==typeof a.resize&&(a.resize(e.clientWidth,e.clientHeight),setTimeout(function(){a.resize(e.clientWidth,e.clientHeight)},400));b.left=e.style.left;b.top=e.style.top}catch(f){}}}function p(a){q.sendEvent(a.type,{message:"HTML5 player not found"})}var q=this,j=new e.eventdispatcher;a.extend(q,j);q.embed=function(){if(f.html5){n.setupPlugins(h,d,r);c.innerHTML="";var g=f.utils.extend({},d);delete g.volume;g=new f.html5.player(g);h.container=document.getElementById(h.id);h.setPlayer(g,
|
||||
"html5")}else g=new a.scriptloader(b.src),g.addEventListener(e.ERROR,p),g.addEventListener(e.COMPLETE,q.embed),g.load()};q.supportsConfig=function(){if(f.vid.canPlayType)try{if("string"==a.typeOf(d.playlist))return!0;for(var b=d.playlist[0].sources,c=0;c<b.length;c++){var e;var h=b[c].file,j=b[c].type;if(null!==navigator.userAgent.match(/BlackBerry/i)||a.isAndroid()&&("m3u"==a.extension(h)||"m3u8"==a.extension(h))||a.isRtmp(h,j))e=!1;else{var n=k[j?j:a.extension(h)],p;if(!n||n.flash&&!n.html5)p=!1;
|
||||
else{var r=n.html5,q=f.vid;if(r)try{p=q.canPlayType(r)?!0:!1}catch(x){p=!1}else p=!0}e=p}if(e)return!0}}catch(v){}return!1}}}(jwplayer),function(f){var a=f.embed,k=f.utils,e=k.extend(function(c){function b(a){m.debug&&k.log(a)}function d(a){a=a.split("/");a=a[a.length-1];a=a.split("?");return a[0]}function e(){if(!C){var a=c.getPosition();b("stop: "+v+" : "+a);s.Media.stop(v,a)}}function h(a){C=!0;x=0;m.mediaName?a=m.mediaName:(a=c.getPlaylistItem(a.index),a=a.title?a.title:a.file?d(a.file):a.sources&&
|
||||
a.sources.length?d(a.sources[0].file):"");v=a;A=m.playerName?m.playerName:c.id}function r(a,b){var c=g.events[a];g.events[a]="function"!=typeof g.events[a]?b:function(a){c&&c(a);b(a)}}var p=k.repo(),q=k.extend({},f.defaults),j=k.extend({},q,c.config),g=c.config,m=g.sitecatalyst,l=j.plugins,t=j.analytics,u=p+"jwpsrv.js",w=p+"sharing.js",z=p+"related.js",B=p+"gapro.js",q=f.key?f.key:q.key,y=(new f.utils.key(q)).edition(),x=0,v="",A="",C=!0,l=l?l:{};"ads"==y&&j.advertising&&(j.advertising.client.match(".js$|.swf$")?
|
||||
l[j.advertising.client]=j.advertising:l[p+j.advertising.client+".js"]=j.advertising);delete g.advertising;g.key=q;j.analytics&&(j.analytics.client&&j.analytics.client.match(".js$|.swf$"))&&(u=j.analytics.client);delete g.analytics;if("free"==y||!t||!1!==t.enabled)l[u]=t?t:{};delete l.sharing;delete l.related;switch(y){case "premium":case "ads":j.sharing&&(j.sharing.client&&j.sharing.client.match(".js$|.swf$")&&(w=j.sharing.client),l[w]=j.sharing),j.related&&(j.related.client&&j.related.client.match(".js$|.swf$")&&
|
||||
(z=j.related.client),l[z]=j.related),j.ga&&(j.ga.client&&j.ga.client.match(".js$|.swf$")&&(B=j.ga.client),l[B]=j.ga),m&&(g.events=k.extend({},g.events),r("onPlay",function(){if(!C){var a=c.getPosition();b("play: "+v+" : "+a);s.Media.play(v,a)}}),r("onPause",function(){e()}),r("onBuffer",function(){e()}),r("onPlaylistItem",h),r("onTime",function(){a:{if(C){var a=c.getDuration();if(-1==a)break a;C=!1;b("open: "+v+" : "+a+" : "+A);s.Media.open(v,a,A);b("play: "+v+" : 0");s.Media.play(v,0)}a=c.getPosition();
|
||||
if(3<=Math.abs(a-x)){var d=x;b("seek: "+d+" to "+a);b("stop: "+v+" : "+d);s.Media.stop(v,d);b("play: "+v+" : "+a);s.Media.play(v,a)}x=a}}),r("onComplete",function(){var a=c.getPosition();b("stop: "+v+" : "+a);s.Media.stop(v,a);b("close: "+v);s.Media.close(v);C=!0;x=0}));case "pro":j.skin&&(g.skin=j.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,k.repo()+"skins/$1.xml"))}g.plugins=l;return new a(c)},a);f.embed=e}(jwplayer),function(f){var a=[],k=f.utils,e=f.events,
|
||||
c=e.state,b=document,d=f.api=function(a){function h(a,b){return function(c){return b(a,c)}}function r(a,b){l[a]||(l[a]=[],q(e.JWPLAYER_PLAYER_STATE,function(b){var c=b.newstate;b=b.oldstate;if(c==a){var d=l[c];if(d)for(var e=0;e<d.length;e++)"function"==typeof d[e]&&d[e].call(this,{oldstate:b,newstate:c})}}));l[a].push(b);return g}function p(a,b){try{a.jwAddEventListener(b,'function(dat) { jwplayer("'+g.id+'").dispatchEvent("'+b+'", dat); }')}catch(c){k.log("Could not add internal listener")}}function q(a,
|
||||
b){m[a]||(m[a]=[],t&&u&&p(t,a));m[a].push(b);return g}function j(){if(u){for(var a=arguments[0],b=[],c=1;c<arguments.length;c++)b.push(arguments[c]);if("undefined"!=typeof t&&"function"==typeof t[a])switch(b.length){case 4:return t[a](b[0],b[1],b[2],b[3]);case 3:return t[a](b[0],b[1],b[2]);case 2:return t[a](b[0],b[1]);case 1:return t[a](b[0]);default:return t[a]()}return null}w.push(arguments)}var g=this,m={},l={},t=void 0,u=!1,w=[],z=void 0,B={},y={};g.container=a;g.id=a.id;g.getBuffer=function(){return j("jwGetBuffer")};
|
||||
g.getContainer=function(){return g.container};g.addButton=function(a,b,c,d){try{y[d]=c,j("jwDockAddButton",a,b,"jwplayer('"+g.id+"').callback('"+d+"')",d)}catch(e){k.log("Could not add dock button"+e.message)}};g.removeButton=function(a){j("jwDockRemoveButton",a)};g.callback=function(a){if(y[a])y[a]()};g.forceState=function(a){j("jwForceState",a);return g};g.releaseState=function(){return j("jwReleaseState")};g.getDuration=function(){return j("jwGetDuration")};g.getFullscreen=function(){return j("jwGetFullscreen")};
|
||||
g.getStretching=function(){return j("jwGetStretching")};g.getHeight=function(){return j("jwGetHeight")};g.getLockState=function(){return j("jwGetLockState")};g.getMeta=function(){return g.getItemMeta()};g.getMute=function(){return j("jwGetMute")};g.getPlaylist=function(){var a=j("jwGetPlaylist");"flash"==g.renderingMode&&k.deepReplaceKeyName(a,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);return a};g.getPlaylistItem=function(a){k.exists(a)||(a=g.getPlaylistIndex());return g.getPlaylist()[a]};
|
||||
g.getPlaylistIndex=function(){return j("jwGetPlaylistIndex")};g.getPosition=function(){return j("jwGetPosition")};g.getRenderingMode=function(){return g.renderingMode};g.getState=function(){return j("jwGetState")};g.getVolume=function(){return j("jwGetVolume")};g.getWidth=function(){return j("jwGetWidth")};g.setFullscreen=function(a){k.exists(a)?j("jwSetFullscreen",a):j("jwSetFullscreen",!j("jwGetFullscreen"));return g};g.setStretching=function(a){j("jwSetStretching",a);return g};g.setMute=function(a){k.exists(a)?
|
||||
j("jwSetMute",a):j("jwSetMute",!j("jwGetMute"));return g};g.lock=function(){return g};g.unlock=function(){return g};g.load=function(a){j("jwLoad",a);return g};g.playlistItem=function(a){j("jwPlaylistItem",parseInt(a));return g};g.playlistPrev=function(){j("jwPlaylistPrev");return g};g.playlistNext=function(){j("jwPlaylistNext");return g};g.resize=function(a,c){if("flash"!=g.renderingMode){var d=document.getElementById(g.id);d.className=d.className.replace(/\s+aspectMode/,"");d.style.display="block";
|
||||
j("jwResize",a,c)}else{var d=b.getElementById(g.id+"_wrapper"),e=b.getElementById(g.id+"_aspect");e&&(e.style.display="none");d&&(d.style.display="block",d.style.width=k.styleDimension(a),d.style.height=k.styleDimension(c))}return g};g.play=function(a){"undefined"==typeof a?(a=g.getState(),a==c.PLAYING||a==c.BUFFERING?j("jwPause"):j("jwPlay")):j("jwPlay",a);return g};g.pause=function(a){"undefined"==typeof a?(a=g.getState(),a==c.PLAYING||a==c.BUFFERING?j("jwPause"):j("jwPlay")):j("jwPause",a);return g};
|
||||
g.stop=function(){j("jwStop");return g};g.seek=function(a){j("jwSeek",a);return g};g.setVolume=function(a){j("jwSetVolume",a);return g};g.loadInstream=function(a,b){return z=new d.instream(this,t,a,b)};g.getQualityLevels=function(){return j("jwGetQualityLevels")};g.getCurrentQuality=function(){return j("jwGetCurrentQuality")};g.setCurrentQuality=function(a){j("jwSetCurrentQuality",a)};g.getCaptionsList=function(){return j("jwGetCaptionsList")};g.getCurrentCaptions=function(){return j("jwGetCurrentCaptions")};
|
||||
g.setCurrentCaptions=function(a){j("jwSetCurrentCaptions",a)};g.getControls=function(){return j("jwGetControls")};g.getSafeRegion=function(){return j("jwGetSafeRegion")};g.setControls=function(a){j("jwSetControls",a)};g.destroyPlayer=function(){j("jwPlayerDestroy")};g.playAd=function(a){j("jwPlayAd",a)};var x={onBufferChange:e.JWPLAYER_MEDIA_BUFFER,onBufferFull:e.JWPLAYER_MEDIA_BUFFER_FULL,onError:e.JWPLAYER_ERROR,onSetupError:e.JWPLAYER_SETUP_ERROR,onFullscreen:e.JWPLAYER_FULLSCREEN,onMeta:e.JWPLAYER_MEDIA_META,
|
||||
onMute:e.JWPLAYER_MEDIA_MUTE,onPlaylist:e.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:e.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:e.JWPLAYER_PLAYLIST_COMPLETE,onReady:e.API_READY,onResize:e.JWPLAYER_RESIZE,onComplete:e.JWPLAYER_MEDIA_COMPLETE,onSeek:e.JWPLAYER_MEDIA_SEEK,onTime:e.JWPLAYER_MEDIA_TIME,onVolume:e.JWPLAYER_MEDIA_VOLUME,onBeforePlay:e.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:e.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:e.JWPLAYER_DISPLAY_CLICK,onControls:e.JWPLAYER_CONTROLS,onQualityLevels:e.JWPLAYER_MEDIA_LEVELS,
|
||||
onQualityChange:e.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:e.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:e.JWPLAYER_CAPTIONS_CHANGED,onAdError:e.JWPLAYER_AD_ERROR,onAdClick:e.JWPLAYER_AD_CLICK,onAdImpression:e.JWPLAYER_AD_IMPRESSION,onAdTime:e.JWPLAYER_AD_TIME,onAdComplete:e.JWPLAYER_AD_COMPLETE,onAdCompanions:e.JWPLAYER_AD_COMPANIONS};k.foreach(x,function(a){g[a]=h(x[a],q)});var v={onBuffer:c.BUFFERING,onPause:c.PAUSED,onPlay:c.PLAYING,onIdle:c.IDLE};k.foreach(v,function(a){g[a]=h(v[a],r)});g.remove=
|
||||
function(){if(!u)throw"Cannot call remove() before player is ready";w=[];d.destroyPlayer(this.id)};g.setup=function(a){if(f.embed){var c=b.getElementById(g.id);c&&(a.fallbackDiv=c);c=g;w=[];d.destroyPlayer(c.id);c=f(g.id);c.config=a;return new f.embed(c)}return g};g.registerPlugin=function(a,b,c,d){f.plugins.registerPlugin(a,b,c,d)};g.setPlayer=function(a,b){t=a;g.renderingMode=b};g.detachMedia=function(){if("html5"==g.renderingMode)return j("jwDetachMedia")};g.attachMedia=function(a){if("html5"==
|
||||
g.renderingMode)return j("jwAttachMedia",a)};g.dispatchEvent=function(a,b){if(m[a])for(var c=k.translateEventResponse(a,b),d=0;d<m[a].length;d++)if("function"==typeof m[a][d])try{a==e.JWPLAYER_PLAYLIST_LOADED&&k.deepReplaceKeyName(c.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),m[a][d].call(this,c)}catch(f){k.log("There was an error calling back an event handler")}};g.dispatchInstreamEvent=function(a){z&&z.dispatchEvent(a,arguments)};g.callInternal=j;g.playerReady=
|
||||
function(a){u=!0;t||g.setPlayer(b.getElementById(a.id));g.container=b.getElementById(g.id);k.foreach(m,function(a){p(t,a)});q(e.JWPLAYER_PLAYLIST_ITEM,function(){B={}});q(e.JWPLAYER_MEDIA_META,function(a){k.extend(B,a.metadata)});for(g.dispatchEvent(e.API_READY);0<w.length;)j.apply(this,w.shift())};g.getItemMeta=function(){return B};g.isBeforePlay=function(){return t.jwIsBeforePlay()};g.isBeforeComplete=function(){return t.jwIsBeforeComplete()};return g};d.selectPlayer=function(c){var e;k.exists(c)||
|
||||
(c=0);c.nodeType?e=c:"string"==typeof c&&(e=b.getElementById(c));return e?(c=d.playerById(e.id))?c:d.addPlayer(new d(e)):"number"==typeof c?a[c]:null};d.playerById=function(b){for(var c=0;c<a.length;c++)if(a[c].id==b)return a[c];return null};d.addPlayer=function(b){for(var c=0;c<a.length;c++)if(a[c]==b)return b;a.push(b);return b};d.destroyPlayer=function(c){for(var d=-1,e,f=0;f<a.length;f++)a[f].id==c&&(d=f,e=a[f]);0<=d&&(c=e.id,f=b.getElementById(c+("flash"==e.renderingMode?"_wrapper":"")),k.clearCss&&
|
||||
k.clearCss("#"+c),f&&("html5"==e.renderingMode&&e.destroyPlayer(),e=b.createElement("div"),e.id=c,f.parentNode.replaceChild(e,f)),a.splice(d,1));return null};f.playerReady=function(a){var b=f.api.playerById(a.id);b?b.playerReady(a):f.api.selectPlayer(a.id).playerReady(a)}}(jwplayer),function(f){var a=f.events,k=f.utils,e=a.state;f.api.instream=function(c,b,d,f){function h(a,b){j[a]||(j[a]=[],q.jwInstreamAddEventListener(a,'function(dat) { jwplayer("'+p.id+'").dispatchInstreamEvent("'+a+'", dat); }'));
|
||||
j[a].push(b);return this}function r(b,c){g[b]||(g[b]=[],h(a.JWPLAYER_PLAYER_STATE,function(a){var c=a.newstate,d=a.oldstate;if(c==b){var e=g[c];if(e)for(var f=0;f<e.length;f++)"function"==typeof e[f]&&e[f].call(this,{oldstate:d,newstate:c,type:a.type})}}));g[b].push(c);return this}var p=c,q=b,j={},g={};this.dispatchEvent=function(a,b){if(j[a])for(var c=k.translateEventResponse(a,b[1]),d=0;d<j[a].length;d++)"function"==typeof j[a][d]&&j[a][d].call(this,c)};this.onError=function(b){return h(a.JWPLAYER_ERROR,
|
||||
b)};this.onFullscreen=function(b){return h(a.JWPLAYER_FULLSCREEN,b)};this.onMeta=function(b){return h(a.JWPLAYER_MEDIA_META,b)};this.onMute=function(b){return h(a.JWPLAYER_MEDIA_MUTE,b)};this.onComplete=function(b){return h(a.JWPLAYER_MEDIA_COMPLETE,b)};this.onTime=function(b){return h(a.JWPLAYER_MEDIA_TIME,b)};this.onBuffer=function(a){return r(e.BUFFERING,a)};this.onPause=function(a){return r(e.PAUSED,a)};this.onPlay=function(a){return r(e.PLAYING,a)};this.onIdle=function(a){return r(e.IDLE,a)};
|
||||
this.onClick=function(b){return h(a.JWPLAYER_INSTREAM_CLICK,b)};this.onInstreamDestroyed=function(b){return h(a.JWPLAYER_INSTREAM_DESTROYED,b)};this.play=function(a){q.jwInstreamPlay(a)};this.pause=function(a){q.jwInstreamPause(a)};this.destroy=function(){q.jwInstreamDestroy()};p.callInternal("jwLoadInstream",d,f?f:{})}}(jwplayer),function(f){var a=f.api,k=a.selectPlayer;a.selectPlayer=function(a){return(a=k(a))?a:{registerPlugin:function(a,b,d){f.plugins.registerPlugin(a,b,d)}}}}(jwplayer));
|
||||
5067
static/js/libs/mediaelement/mediaelement-and-player.js
Normal file
5067
static/js/libs/mediaelement/mediaelement-and-player.js
Normal file
File diff suppressed because it is too large
Load Diff
173
static/js/libs/mediaelement/mediaelement-and-player.min.js
vendored
Normal file
173
static/js/libs/mediaelement/mediaelement-and-player.min.js
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
/*!
|
||||
* MediaElement.js
|
||||
* HTML5 <video> and <audio> shim and player
|
||||
* http://mediaelementjs.com/
|
||||
*
|
||||
* Creates a JavaScript object that mimics HTML5 MediaElement API
|
||||
* for browsers that don't understand HTML5 or can't play the provided codec
|
||||
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
||||
*
|
||||
* Copyright 2010-2013, John Dyer (http://j.hn)
|
||||
* License: MIT
|
||||
*
|
||||
*/var mejs=mejs||{};mejs.version="2.12.1";mejs.meIndex=0;
|
||||
mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo",
|
||||
"video/x-vimeo"]}]};
|
||||
mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>-1){g=f.substring(c+
|
||||
1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d==
|
||||
"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display=
|
||||
"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
|
||||
mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
|
||||
!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}};
|
||||
mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
|
||||
mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
|
||||
mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=
|
||||
-1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window&&window.ontouchstart!=null;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;
|
||||
try{e.canPlayType("video/mp4")}catch(g){a.supportsMediaTag=false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=
|
||||
false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&h.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();
|
||||
else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
|
||||
mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
|
||||
mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}};
|
||||
mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused=
|
||||
false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably"}return""},
|
||||
positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
|
||||
this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a);
|
||||
this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&
|
||||
this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},hasAttribute:function(a){return a in
|
||||
this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
|
||||
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
|
||||
b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
|
||||
mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
|
||||
defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
|
||||
mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
|
||||
"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},
|
||||
determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src");
|
||||
l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!(mejs.MediaFeatures.isBustedNativeHTTPS&&
|
||||
b.httpsBasicAuthSite===true)){if(!d){g=document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=
|
||||
0;g<f.length;g++){l=f[g].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},
|
||||
getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className=
|
||||
"me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),
|
||||
m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeight:b.videoHeight>
|
||||
0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){g=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+
|
||||
g,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML=
|
||||
'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=
|
||||
document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML=
|
||||
'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l,
|
||||
videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";c.removeAttribute("autoplay");return j},updateNative:function(a,
|
||||
b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
|
||||
mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,
|
||||
{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
|
||||
c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
|
||||
a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+
|
||||
c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=
|
||||
document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;
|
||||
c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
|
||||
(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.locale.getLanguage=function(){return c.locale.language||navigator.language};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=
|
||||
c.methods.checkPlain(e[f]);break;case "!":break;default:e[f]='<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",
|
||||
message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);
|
||||
(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
|
||||
|
||||
/*!
|
||||
* MediaElementPlayer
|
||||
* http://mediaelementjs.com/
|
||||
*
|
||||
* Creates a controller bar for HTML5 <video> add <audio> tags
|
||||
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
||||
*
|
||||
* Copyright 2010-2013, John Dyer (http://j.hn/)
|
||||
* License: MIT
|
||||
*
|
||||
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
||||
(function(f){mejs.MepDefaults={poster:"",showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,
|
||||
hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-
|
||||
0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!=
|
||||
"undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;
|
||||
mejs.players[this.id]=this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
|
||||
"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);
|
||||
a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,
|
||||
1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==
|
||||
null?a.$media.attr("height"):a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.controlsAreVisible&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});
|
||||
b.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!(!b.controlsAreVisible||b.options.alwaysShowControls))if(a){b.controls.stop(true,
|
||||
true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},
|
||||
controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);
|
||||
this.controlsEnabled=true},meReady:function(a,b){var c=this,e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);
|
||||
c.findTracks();for(g in c.options.features){e=c.options.features[g];if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){if(c.options.clickToPlayPause)c.media.paused?
|
||||
c.media.play():c.media.pause()};c.media.addEventListener("click",c.clickToPlayPauseCallback,false);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&
|
||||
c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m=
|
||||
mejs.players[j];m.id!=c.id&&c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&
|
||||
c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(d&&a.pluginType=="native"){a.load();
|
||||
a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===
|
||||
1||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()===
|
||||
"body"){d=f(window).width();c=f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");
|
||||
d.height(this.container.height()-this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!=
|
||||
"absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},
|
||||
false);a.options.showPosterWhenEnded&&a.options.autoRewind&&e.addEventListener("ended",function(){d.show()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),
|
||||
k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(d.options.clickToPlayPause)e.paused?e.play():e.pause()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();
|
||||
k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",
|
||||
function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("error",function(){g.hide();b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown",function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();
|
||||
j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).closest(".mejs-container").length==0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")?e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,
|
||||
this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=
|
||||
this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}if(this.isDynamic)this.$node.insertBefore(this.container);else{this.$media.prop("controls",true);this.$node.clone().show().insertBefore(this.container);this.$node.remove()}this.media.pluginType!=="native"&&this.media.remove();delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+
|
||||
e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");return d}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,
|
||||
e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")},
|
||||
false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left",
|
||||
"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
|
||||
(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d=
|
||||
this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n));
|
||||
m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);
|
||||
e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,
|
||||
Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b,
|
||||
c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
|
||||
f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()},
|
||||
false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:
|
||||
this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+
|
||||
'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b),
|
||||
j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute");
|
||||
if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true):
|
||||
e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0);
|
||||
k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=
|
||||
false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&
|
||||
mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events",
|
||||
"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l,
|
||||
left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show();
|
||||
t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover",
|
||||
function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},
|
||||
containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==
|
||||
screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id,
|
||||
"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
|
||||
f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();
|
||||
f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
|
||||
this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=
|
||||
f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+
|
||||
a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(d=b=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&b++;this.options.toggleCaptionsButtonWhenOnlyOne&&b==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},
|
||||
function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});
|
||||
a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(d=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&a.addTrackButton(a.tracks[d].srclang,a.tracks[d].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
||||
"visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==
|
||||
null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=typeof e=="string"&&
|
||||
/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);
|
||||
this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},
|
||||
adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!=
|
||||
"undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer==
|
||||
"undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=
|
||||
a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-
|
||||
1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));
|
||||
b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",
|
||||
ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
|
||||
parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]),
|
||||
stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
|
||||
if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
|
||||
"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return mejs.i18n.t("Download Video")},
|
||||
click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},
|
||||
isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,
|
||||
b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!=
|
||||
"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended",
|
||||
function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$);
|
||||
|
||||
1902
static/js/libs/mediaelement/mediaelement.js
Normal file
1902
static/js/libs/mediaelement/mediaelement.js
Normal file
File diff suppressed because it is too large
Load Diff
68
static/js/libs/mediaelement/mediaelement.min.js
vendored
Normal file
68
static/js/libs/mediaelement/mediaelement.min.js
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
/*!
|
||||
* MediaElement.js
|
||||
* HTML5 <video> and <audio> shim and player
|
||||
* http://mediaelementjs.com/
|
||||
*
|
||||
* Creates a JavaScript object that mimics HTML5 MediaElement API
|
||||
* for browsers that don't understand HTML5 or can't play the provided codec
|
||||
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
||||
*
|
||||
* Copyright 2010-2013, John Dyer (http://j.hn)
|
||||
* License: MIT
|
||||
*
|
||||
*/var mejs=mejs||{};mejs.version="2.12.1";mejs.meIndex=0;
|
||||
mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo",
|
||||
"video/x-vimeo"]}]};
|
||||
mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>-1){g=f.substring(c+
|
||||
1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d==
|
||||
"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display=
|
||||
"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
|
||||
mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
|
||||
!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}};
|
||||
mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
|
||||
mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
|
||||
mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=
|
||||
-1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window&&window.ontouchstart!=null;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;
|
||||
try{e.canPlayType("video/mp4")}catch(g){a.supportsMediaTag=false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=
|
||||
false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&h.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();
|
||||
else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
|
||||
mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
|
||||
mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}};
|
||||
mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused=
|
||||
false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably"}return""},
|
||||
positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
|
||||
this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a);
|
||||
this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&
|
||||
this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},hasAttribute:function(a){return a in
|
||||
this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
|
||||
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
|
||||
b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
|
||||
mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
|
||||
defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
|
||||
mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
|
||||
"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},
|
||||
determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src");
|
||||
l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!(mejs.MediaFeatures.isBustedNativeHTTPS&&
|
||||
b.httpsBasicAuthSite===true)){if(!d){g=document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=
|
||||
0;g<f.length;g++){l=f[g].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},
|
||||
getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className=
|
||||
"me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),
|
||||
m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeight:b.videoHeight>
|
||||
0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){g=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+
|
||||
g,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML=
|
||||
'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=
|
||||
document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML=
|
||||
'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l,
|
||||
videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";c.removeAttribute("autoplay");return j},updateNative:function(a,
|
||||
b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
|
||||
mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,
|
||||
{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
|
||||
c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
|
||||
a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+
|
||||
c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=
|
||||
document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;
|
||||
c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
|
||||
(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.locale.getLanguage=function(){return c.locale.language||navigator.language};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=
|
||||
c.methods.checkPlain(e[f]);break;case "!":break;default:e[f]='<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",
|
||||
message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);
|
||||
(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
|
||||
3163
static/js/libs/mediaelement/mediaelementplayer.js
Normal file
3163
static/js/libs/mediaelement/mediaelementplayer.js
Normal file
File diff suppressed because it is too large
Load Diff
103
static/js/libs/mediaelement/mediaelementplayer.min.js
vendored
Normal file
103
static/js/libs/mediaelement/mediaelementplayer.min.js
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
/*!
|
||||
* MediaElementPlayer
|
||||
* http://mediaelementjs.com/
|
||||
*
|
||||
* Creates a controller bar for HTML5 <video> add <audio> tags
|
||||
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
||||
*
|
||||
* Copyright 2010-2013, John Dyer (http://j.hn/)
|
||||
* License: MIT
|
||||
*
|
||||
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
||||
(function(f){mejs.MepDefaults={poster:"",showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,
|
||||
hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-
|
||||
0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!=
|
||||
"undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;
|
||||
mejs.players[this.id]=this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
|
||||
"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);
|
||||
a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,
|
||||
1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==
|
||||
null?a.$media.attr("height"):a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.controlsAreVisible&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});
|
||||
b.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!(!b.controlsAreVisible||b.options.alwaysShowControls))if(a){b.controls.stop(true,
|
||||
true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},
|
||||
controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);
|
||||
this.controlsEnabled=true},meReady:function(a,b){var c=this,e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);
|
||||
c.findTracks();for(g in c.options.features){e=c.options.features[g];if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){if(c.options.clickToPlayPause)c.media.paused?
|
||||
c.media.play():c.media.pause()};c.media.addEventListener("click",c.clickToPlayPauseCallback,false);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&
|
||||
c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m=
|
||||
mejs.players[j];m.id!=c.id&&c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&
|
||||
c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(d&&a.pluginType=="native"){a.load();
|
||||
a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===
|
||||
1||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()===
|
||||
"body"){d=f(window).width();c=f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");
|
||||
d.height(this.container.height()-this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!=
|
||||
"absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},
|
||||
false);a.options.showPosterWhenEnded&&a.options.autoRewind&&e.addEventListener("ended",function(){d.show()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),
|
||||
k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(d.options.clickToPlayPause)e.paused?e.play():e.pause()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();
|
||||
k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",
|
||||
function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("error",function(){g.hide();b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown",function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();
|
||||
j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).closest(".mejs-container").length==0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")?e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,
|
||||
this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=
|
||||
this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}if(this.isDynamic)this.$node.insertBefore(this.container);else{this.$media.prop("controls",true);this.$node.clone().show().insertBefore(this.container);this.$node.remove()}this.media.pluginType!=="native"&&this.media.remove();delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+
|
||||
e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");return d}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,
|
||||
e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")},
|
||||
false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left",
|
||||
"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
|
||||
(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d=
|
||||
this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n));
|
||||
m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);
|
||||
e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,
|
||||
Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b,
|
||||
c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
|
||||
f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()},
|
||||
false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:
|
||||
this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+
|
||||
'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b),
|
||||
j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute");
|
||||
if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true):
|
||||
e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0);
|
||||
k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=
|
||||
false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&
|
||||
mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events",
|
||||
"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l,
|
||||
left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show();
|
||||
t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover",
|
||||
function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},
|
||||
containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==
|
||||
screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id,
|
||||
"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
|
||||
f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();
|
||||
f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
|
||||
this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=
|
||||
f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+
|
||||
a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(d=b=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&b++;this.options.toggleCaptionsButtonWhenOnlyOne&&b==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},
|
||||
function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});
|
||||
a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(d=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&a.addTrackButton(a.tracks[d].srclang,a.tracks[d].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
||||
"visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==
|
||||
null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=typeof e=="string"&&
|
||||
/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);
|
||||
this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},
|
||||
adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!=
|
||||
"undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer==
|
||||
"undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=
|
||||
a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-
|
||||
1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));
|
||||
b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",
|
||||
ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
|
||||
parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]),
|
||||
stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
|
||||
if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
|
||||
"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return mejs.i18n.t("Download Video")},
|
||||
click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},
|
||||
isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,
|
||||
b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!=
|
||||
"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
||||
(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended",
|
||||
function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$);
|
||||
@@ -67,7 +67,6 @@
|
||||
<script src="{{ STATIC_URL }}js/libs/select2.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/libs/ajaxfileupload.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/app/site.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/app/social.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/com.podnoms.storage.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/com.podnoms.player.js"></script>
|
||||
{% endcompress %}
|
||||
|
||||
24
templates/inc/embed/mix.html
Normal file
24
templates/inc/embed/mix.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<script src="{{ STATIC_URL }}js/libs/jquery.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/libs/mediaelement/mediaelement-and-player.js"></script>
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.css"/>
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/mediaelementplayer.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<audio id="dss-player" src="{{ audio_url }}" type="audio/mp3" controls="controls">
|
||||
</audio>
|
||||
<aside>Audio provided by <a href="{{ mix_url }}">Deep South Sounds</a></aside>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function ($) {
|
||||
// declare object for video
|
||||
var player = new MediaElementPlayer('#dss-player', {
|
||||
features: ['playpause', 'loop', 'current', 'progress', 'duration', 'volume']
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -44,12 +44,12 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
| <i class="icon-comment"></i> <a href="/user/<%= slug %>"><%= mix_count%> Mixes</a>
|
||||
| <i class="icon-share"></i> <a href="/user/<%= slug %>/favourites"><%= favourite_count %>
|
||||
| <i class="icon-music"></i> <a href="/user/<%= slug %>/"><%= mix_count%> Mixes</a>
|
||||
| <i class="icon-heart"></i> <a href="/user/<%= slug %>/favourites/"><%= favourite_count %>
|
||||
Favourites</a>
|
||||
| <i class="icon-share"></i> <a href="/user/<%= slug %>/likes"><%= like_count %> Likes</a>
|
||||
| <i class="icon-share"></i> <a href="#"><%= follower_count %> Followers</a>
|
||||
| <i class="icon-share"></i> <a href="#"><%= following_count %> Following</a>
|
||||
| <i class="icon-star-empty"></i> <a href="/user/<%= slug %>/likes/"><%= like_count %> Likes</a>
|
||||
| <i class="icon-check"></i> <a href="/user/<%= slug %>/followers/"><%= follower_count %> Followers</a>
|
||||
| <i class="icon-share"></i> <a href="/user/<%= slug %>/following/"><%= following_count %> Following</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -95,6 +95,12 @@
|
||||
Twitter
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-mode="embed"
|
||||
class="share-button share-button-embed">
|
||||
Embed
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
14
templates/views/dlg/EmbedCodes.html
Normal file
14
templates/views/dlg/EmbedCodes.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends 'views/dlg/_DialogBase.html' %}
|
||||
|
||||
{% load account %}
|
||||
{% load socialaccount %}
|
||||
{% block header %}
|
||||
<h3>Embed Codes!!</h3>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<textarea style="width:100%" rows="3">
|
||||
<iframe src="{{ embed_code }}"></iframe>
|
||||
</textarea>
|
||||
{% endblock %}
|
||||
{% block primarybutton %}Got it...{% endblock %}
|
||||
Reference in New Issue
Block a user