PowerPress Podcasting plugin by Blubrry - Version 2.0

Version Description

  • Released on 3/7/2011
  • PowerPress now requires WordPress version 2.8 or newer.
  • HTML5 video player with Flow Player Classic fallback added
  • HTML5 audio player with Flow Player Classic fallback added
  • Embed Episode feature, embeds your audience can take with them (just like YouTube embeds)
  • WebM video support added
  • Ogg audio/video support improved
  • For mp4/m4v video, a new alternative WebM URL field has been added. This is ideal for supporting all browser based HTML5 video players.
  • Flow Player Classic can now play m4a audio and mp4/m4v video
  • Elimation of Simple Mode
  • Video default size is now 400 wide by 225 high (a 16:9 ratio)
  • New Video Player settings page added
  • Settings pages enhanced with new options such as location, frequency and T.V. options added
  • Episode Entry box enhanced with new 'isHD' option when video entered into Media URL box
  • Episode Entry box now includes option to configure video player width/height on a per-episode basis.
  • New RawVoice RSS namespace added
  • Player logic has been moved to powerpress-player.php, and a new option is available to disable player options completely. When player options disabled completely, the powerpress-player.php is not included in normal page loads.
  • PowerPress updated to be able to import episodes from latest versions of PodPress (change made in February, 2011 in PodPress how episodes are stored in WordPress).
  • New watarmarks added to Episode Entry Box for HH:MM:SS. Watermarks will be incorporated in additional fields in the future.
  • iTunes Update Directory feature (pingPodcast) is slated for removal in next release. Apple no longer supports this feature. Read more here: Apple Drops iTunes Podcast Directory Update Listing/Ping (pingPodcast) Function
  • Upload image option added to supplement the video poster image field. Images are uploaded to the built-in image gallery in WordPress.
  • Option added to include play icon over poster image where applicable (such as HTML5 Video)
  • Error message displayed if another plugin is including a different version of the getid3 library.
  • New Blubrry PowerPress and Community Podcast added to welcome tab and dashboard.
  • By default, media files with extension .ogg are treated as audio. Video ogg files should use the .ogv extension. If you wish to override this behavior, add the following define to your wp-config.php: define('POWERPRESS_OGG_VIDEO', true);
  • Added define option define('POWERPRESS_ENCLOSURE_FIX', true); that can be added to your wp-config.php to fix missing enclosures in feeds when using plugins such as WishList Member. (Thanks Patrick for helping us fix this issue)
  • Fixed bug with download and play in new window text not getting translated for non-english languages. (Thanks infusiastic for bringing to our attention).
Download this release

Release Info

Developer amandato
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 2.0
Comparing to
See all releases

Code changes from version 1.0.13 to 2.0

3rdparty/jquery.watermark.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*
2
+ Watermark v3.1.1 (January 10, 2011) plugin for jQuery
3
+ http://jquery-watermark.googlecode.com/
4
+ Copyright (c) 2009-2011 Todd Northrop
5
+ http://www.speednet.biz/
6
+ Dual licensed under the MIT or GPL Version 2 licenses.
7
+ */
8
+ (function(b,j,y){var p="function",k="password",d="maxLength",g="type",a="",c=true,o="placeholder",e=false,w="watermark",l=w,i="watermarkClass",t="watermarkFocus",n="watermarkSubmit",r="watermarkMaxLength",h="watermarkPassword",f="watermarkText",m=/\r/g,v=":data("+l+")",q=":text,:password,:search,textarea",s=["Page_ClientValidate"],u=e,x=o in document.createElement("input");b.watermark=b.watermark||{version:"3.1.1",runOnce:c,options:{className:w,useNative:c,hideBeforeUnload:c},hide:function(a){b(a).filter(v).each(function(){b.watermark._hide(b(this))})},_hide:function(b,q){var o=b[0],p=(o.value||a).replace(m,a),l=b.data(f)||a,n=b.data(r)||0,k=b.data(i);if(l.length&&p==l){o.value=a;if(b.data(h))if((b.attr(g)||a)==="text"){var e=b.data(h)||[],c=b.parent()||[];if(e.length&&c.length){c[0].removeChild(b[0]);c[0].appendChild(e[0]);b=e}}if(n){b.attr(d,n);b.removeData(r)}if(q){b.attr("autocomplete","off");j.setTimeout(function(){b.select()},1)}}k&&b.removeClass(k)},show:function(a){b(a).filter(v).each(function(){b.watermark._show(b(this))})},_show:function(e){var p=e[0],v=(p.value||a).replace(m,a),j=e.data(f)||a,q=e.attr(g)||a,s=e.data(i);if((v.length==0||v==j)&&!e.data(t)){u=c;if(e.data(h))if(q===k){var o=e.data(h)||[],n=e.parent()||[];if(o.length&&n.length){n[0].removeChild(e[0]);n[0].appendChild(o[0]);e=o;e.attr(d,j.length);p=e[0]}}if(q==="text"||q==="search"){var l=e.attr(d)||0;if(l>0&&j.length>l){e.data(r,l);e.attr(d,j.length)}}s&&e.addClass(s);p.value=j}else b.watermark._hide(e)},hideAll:function(){if(u){b.watermark.hide(q);u=e}},showAll:function(){b.watermark.show(q)}};b.fn.watermark=b.fn.watermark||function(s,r){var u="string";if(!this.length)return this;var w=e,v=typeof s===u;if(v)s=s.replace(m,a);if(typeof r==="object"){w=typeof r.className===u;r=b.extend({},b.watermark.options,r)}else if(typeof r===u){w=c;r=b.extend({},b.watermark.options,{className:r})}else r=b.watermark.options;if(typeof r.useNative!==p)r.useNative=r.useNative?function(){return c}:function(){return e};return this.each(function(){var z="dragleave",y="dragenter",B=this,e=b(B);if(!e.is(q))return;if(e.data(l)){if(v||w){b.watermark._hide(e);v&&e.data(f,s);w&&e.data(i,r.className)}}else{if(x&&r.useNative.call(B,e)&&(e.attr("tagName")||a)!=="TEXTAREA"){v&&e.attr(o,s);return}e.data(f,v?s:a);e.data(i,r.className);e.data(l,1);if((e.attr(g)||a)===k){var C=e.wrap("<span>").parent(),p=b(C.html().replace(/type=["']?password["']?/i,'type="text"'));p.data(f,e.data(f));p.data(i,e.data(i));p.data(l,1);p.attr(d,s.length);p.focus(function(){b.watermark._hide(p,c)}).bind(y,function(){b.watermark._hide(p)}).bind("dragend",function(){j.setTimeout(function(){p.blur()},1)});e.blur(function(){b.watermark._show(e)}).bind(z,function(){b.watermark._show(e)});p.data(h,e);e.data(h,p)}else e.focus(function(){e.data(t,1);b.watermark._hide(e,c)}).blur(function(){e.data(t,0);b.watermark._show(e)}).bind(y,function(){b.watermark._hide(e)}).bind(z,function(){b.watermark._show(e)}).bind("dragend",function(){j.setTimeout(function(){b.watermark._show(e)},1)}).bind("drop",function(d){var c=e[0],b=d.originalEvent.dataTransfer.getData("Text");if((c.value||a).replace(m,a).replace(b,a)===e.data(f))c.value=b;e.focus()});if(B.form){var u=B.form,A=b(u);if(!A.data(n)){A.submit(b.watermark.hideAll);if(u.submit){A.data(n,u.submit);u.submit=function(c,a){return function(){var d=a.data(n);b.watermark.hideAll();if(d.apply)d.apply(c,Array.prototype.slice.call(arguments));else d()}}(u,A)}else{A.data(n,1);u.submit=function(a){return function(){b.watermark.hideAll();delete a.submit;a.submit()}}(u)}}}}b.watermark._show(e)})};if(b.watermark.runOnce){b.watermark.runOnce=e;b.extend(b.expr[":"],{search:function(b){return"search"===(b.type||a)},data:function(c,d,a){return!!b.data(c,a[3])}});(function(c){b.fn.val=function(){var d=this;if(!d.length)return arguments.length?d:y;if(!arguments.length)if(d.data(l)){var e=(d[0].value||a).replace(m,a);return e===(d.data(f)||a)?a:e}else return c.apply(d,arguments);else{c.apply(d,arguments);b.watermark.show(d);return d}}})(b.fn.val);s.length&&b(function(){for(var a,c,d=s.length-1;d>=0;d--){a=s[d];c=j[a];if(typeof c===p)j[a]=function(a){return function(){b.watermark.hideAll();return a.apply(null,Array.prototype.slice.call(arguments))}}(c)}});b(j).bind("beforeunload",function(){b.watermark.options.hideBeforeUnload&&b.watermark.hideAll()})}})(jQuery,window);
audio-player.swf CHANGED
Binary file
black.png ADDED
Binary file
css/admin.css CHANGED
@@ -19,7 +19,7 @@
19
  font-weight: bold;
20
  }
21
  #powerpress_settings {
22
- background-image:url(http://images.blubrry.com/powerpress/blubrry_logo.png);
23
  background-repeat: no-repeat;
24
  background-position: bottom right;
25
  }
@@ -130,3 +130,54 @@ padding-bottom: 15px;
130
  margin-top: 0;
131
  margin-bottom: 0;
132
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  font-weight: bold;
20
  }
21
  #powerpress_settings {
22
+ background-image:url(http://images.blubrry.com/powerpress/blubrry_logo2.png);
23
  background-repeat: no-repeat;
24
  background-position: bottom right;
25
  }
130
  margin-top: 0;
131
  margin-bottom: 0;
132
  }
133
+
134
+ .powerpress-welcome-news {
135
+ margin: 10px 0 0 0;
136
+ float: left;
137
+ width: 60%;
138
+ border-right: 1px solid #CCCCCC;
139
+ }
140
+ .powerpress-welcome-news > div {
141
+ margin: 0 10px 0 0;
142
+ }
143
+ .powerpress-welcome-news a {
144
+ text-decoration: none;
145
+ }
146
+ .powerpress-welcome-news .rsswidget {
147
+ font-size: 110%;
148
+ font-weight: bold;
149
+ }
150
+ .powerpress-welcome-news .rss-date {
151
+ font-size: 80%;
152
+ margin-left: 10px;
153
+ }
154
+ .powerpress-welcome-news .rssSummary {
155
+ font-size: 95%;
156
+ }
157
+ .powerpress-welcome-news .powerpressNewsPlayer {
158
+ margin-top: 5px;
159
+ }
160
+ .powerpress-welcome-highlighted {
161
+ margin: 10px 0 0 0;
162
+ float: left;
163
+ width: 39%;
164
+ }
165
+ .powerpress-welcome-highlighted > div {
166
+ margin: 0 0 0 10px;
167
+ }
168
+ .powerpress-welcome-highlighted a {
169
+ text-decoration: none;
170
+ }
171
+ .powerpress-welcome-highlighted .rsswidget {
172
+ font-size: 115%;
173
+ font-weight: bold;
174
+ }
175
+ .powerpress-welcome-highlighted .rssSummary {
176
+ font-size: 95%;
177
+ }
178
+ .powerpress-welcome-news ul li, .powerpress-welcome-highlighted ul li {
179
+ margin: 15px 0 10px 0;
180
+ }
181
+ .powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
182
+ padding: 0;
183
+ }
images/itunes_modern.png ADDED
Binary file
images/zune.png ADDED
Binary file
mp3info.class.php CHANGED
@@ -478,6 +478,36 @@
478
  $LocalFile = $File;
479
  }
480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481
  if( !is_file($LocalFile) )
482
  {
483
  $this->SetError( __('Error occurred downloading media file.', 'powerpress') );
@@ -502,6 +532,8 @@
502
  // Hack so this works in Windows, helper apps are not necessary for what we're doing anyway
503
  define('GETID3_HELPERAPPSDIR', true);
504
  require_once(POWERPRESS_ABSPATH.'/getid3/getid3.php');
 
 
505
  $getID3 = new getID3;
506
  $FileInfo = $getID3->analyze( $LocalFile, $this->m_ContentLength );
507
  if( $DeleteFile )
478
  $LocalFile = $File;
479
  }
480
 
481
+ if( class_exists('getID3') && !defined('POWERPRESS_GETID3_LOADED') )
482
+ {
483
+ $pre_msg = __('PowerPress is unable to detect media information.', 'powerpress') .'<br />';
484
+ $getID3 = new getID3;
485
+ if( defined('GETID3_INCLUDEPATH') ) {
486
+ $plugin_title = '';
487
+ $plugins_path = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR;
488
+ $path = substr(GETID3_INCLUDEPATH, strlen($plugins_path));
489
+ if( preg_match('/^([^\\/\\\\]*)/i', $path, $matches) )
490
+ {
491
+ $plugin_folder = $matches[1];
492
+ $current_plugins = get_option('active_plugins');
493
+ while( list($null,$plugin_local_path) = each($current_plugins) )
494
+ {
495
+ if( substr($plugin_local_path, 0, strpos($plugin_local_path, '/') ) != $plugin_folder )
496
+ continue;
497
+ $plugin_data = get_plugin_data( rtrim(WP_PLUGIN_DIR, '/\\'). '/'. rtrim($plugin_local_path, '\\/'), false, false ); //Do not apply markup/translate as it'll be cached.
498
+ $plugin_title = $plugin_data['Title'];
499
+ }
500
+ }
501
+ if( $plugin_title )
502
+ $this->SetError( $pre_msg. sprintf(__('Plugin \'%s\' has included a different version of the GetID3 library located in %s', 'powerpress'), $plugin_title, $path) );
503
+ else
504
+ $this->SetError( $pre_msg. sprintf(__('Another plugin has included a different version of the GetID3 library located in %s', 'powerpress'), $path) );
505
+ } else {
506
+ $this->SetError( $pre_msg. __('Another plugin has included a different version of the GetID3 library.', 'powerpress') );
507
+ }
508
+ return false;
509
+ }
510
+
511
  if( !is_file($LocalFile) )
512
  {
513
  $this->SetError( __('Error occurred downloading media file.', 'powerpress') );
532
  // Hack so this works in Windows, helper apps are not necessary for what we're doing anyway
533
  define('GETID3_HELPERAPPSDIR', true);
534
  require_once(POWERPRESS_ABSPATH.'/getid3/getid3.php');
535
+ define('POWERPRESS_GETID3_LOADED', true);
536
+
537
  $getID3 = new getID3;
538
  $FileInfo = $getID3->analyze( $LocalFile, $this->m_ContentLength );
539
  if( $DeleteFile )
play_audio.png ADDED
Binary file
play_default.jpg DELETED
Binary file
play_video.png ADDED
Binary file
play_video_default.jpg CHANGED
Binary file
player.js CHANGED
@@ -8,6 +8,7 @@
8
  * Released under Aoache 2 license:
9
  * http://www.apache.org/licenses/LICENSE-2.0
10
  *
 
11
  * versoin 1.2.0 - 07/20/2009 - Major rewrite, we're now replying less upon this javascript to make way for flexibility for adding future players.
12
  * versoin 1.1.3 - 03/23/2009 - Added code to support FlowPlayer v3.
13
  * versoin 1.1.2 - 03/04/2009 - Added options to set the width for audio, width and height for video.
@@ -35,6 +36,8 @@ function powerpress_embed_quicktime(div,media_url,width,height,scale)
35
  var contentType = 'video/mpeg'; // Default content type
36
  if( media_url.indexOf('.m4v') > -1 )
37
  contentType = 'video/x-m4v';
 
 
38
  else if( media_url.indexOf('.m4a') > -1 )
39
  contentType = 'audio/x-m4a';
40
  else if( media_url.indexOf('.avi') > -1 )
@@ -45,6 +48,8 @@ function powerpress_embed_quicktime(div,media_url,width,height,scale)
45
  contentType = 'video/quicktime';
46
 
47
  var Html = '';
 
 
48
  Html += '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+ width +'" height="'+ height +'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n';
49
  Html += ' <param name="src" value="'+ media_url +'" />\n';
50
  Html += ' <param name="href" value="'+ media_url +'" />\n';
@@ -54,6 +59,8 @@ function powerpress_embed_quicktime(div,media_url,width,height,scale)
54
  Html += ' <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />\n';
55
  Html += ' <embed type="'+ contentType +'" src="'+ media_url +'" width="'+ width +'" height="'+ height +'" scale="'+ scale +'" correction="full" cache="true" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></embed>';
56
  Html += '</object>\n';
 
 
57
  document.getElementById(div).innerHTML = Html;
58
  return false; // stop the default link from proceeding
59
  }
@@ -61,6 +68,168 @@ function powerpress_embed_quicktime(div,media_url,width,height,scale)
61
  return true; // let the default link to the media open...
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  /**
65
  Insert embed for windows media within specified div
66
 
8
  * Released under Aoache 2 license:
9
  * http://www.apache.org/licenses/LICENSE-2.0
10
  *
11
+ * versoin 1.3.0 02/18/2011 - Adding HTML5 audio/video tags if format possibly supported around default video embed.
12
  * versoin 1.2.0 - 07/20/2009 - Major rewrite, we're now replying less upon this javascript to make way for flexibility for adding future players.
13
  * versoin 1.1.3 - 03/23/2009 - Added code to support FlowPlayer v3.
14
  * versoin 1.1.2 - 03/04/2009 - Added options to set the width for audio, width and height for video.
36
  var contentType = 'video/mpeg'; // Default content type
37
  if( media_url.indexOf('.m4v') > -1 )
38
  contentType = 'video/x-m4v';
39
+ if( media_url.indexOf('.mp4') > -1 )
40
+ contentType = 'video/mp4';
41
  else if( media_url.indexOf('.m4a') > -1 )
42
  contentType = 'audio/x-m4a';
43
  else if( media_url.indexOf('.avi') > -1 )
48
  contentType = 'video/quicktime';
49
 
50
  var Html = '';
51
+ if( contentType == 'video/mp4' || contentType == 'video/x-m4v' )
52
+ Html += '<video src="'+ media_url +'" width="'+ width +'" height="'+ height +'" controls autoplay>';
53
  Html += '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+ width +'" height="'+ height +'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n';
54
  Html += ' <param name="src" value="'+ media_url +'" />\n';
55
  Html += ' <param name="href" value="'+ media_url +'" />\n';
59
  Html += ' <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />\n';
60
  Html += ' <embed type="'+ contentType +'" src="'+ media_url +'" width="'+ width +'" height="'+ height +'" scale="'+ scale +'" correction="full" cache="true" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></embed>';
61
  Html += '</object>\n';
62
+ if( contentType == 'video/mp4' || contentType == 'video/x-m4v' )
63
+ Html += '</video>';
64
  document.getElementById(div).innerHTML = Html;
65
  return false; // stop the default link from proceeding
66
  }
68
  return true; // let the default link to the media open...
69
  }
70
 
71
+ function powerpress_show_embed(id)
72
+ {
73
+ if( document.getElementById('powerpress_embed_'+id) ) {
74
+ document.getElementById('powerpress_embed_'+id).style.display = 'block';
75
+ document.getElementById('powerpress_embed_'+id +'_t').select();
76
+ }
77
+ return false;
78
+ }
79
+
80
+ function powerpress_embed_html5iframe(id, url, width, height)
81
+ {
82
+ if( document.getElementById('powerpress_player_'+id) ) {
83
+ var Html = '';
84
+ Html += '<iframe';
85
+ Html += ' class="powerpress-player-embed"';
86
+ Html += ' width="' + width +'"';
87
+ Html += ' height="'+ height +'"';
88
+ Html += ' src="'+ url +'"';
89
+ Html += ' frameborder="0"';
90
+ Html += '></iframe>';
91
+ document.getElementById('powerpress_player_'+id).innerHTML = Html;
92
+ return false;
93
+ }
94
+ return true;
95
+ }
96
+
97
+ /**
98
+ Insert embed for H.264 mp4 video, with fallback to WebM
99
+
100
+ @div - specific div to insert embed into
101
+ @media_url - URL of media file to play
102
+ @width - width of player
103
+ @height - height of player
104
+ @webm_media_url - Alternative WebM media URL
105
+ */
106
+ function powerpress_embed_html5v(id,media_url,width,height,webm_media_url)
107
+ {
108
+ if( document.getElementById('powerpress_player_'+id) )
109
+ {
110
+ var poster = '';
111
+ if( document.getElementById('powerpress_player_'+id).getElementsByTagName ) {
112
+ var images = document.getElementById('powerpress_player_'+id).getElementsByTagName('img');
113
+ if( images.length && images[0].src )
114
+ poster = images[0].src;
115
+ }
116
+
117
+ var contentType = 'video/mp4'; // Default content type
118
+ if( media_url.indexOf('.webm') > -1 )
119
+ contentType = 'video/webm';
120
+ if( media_url.indexOf('.ogg') > -1 || media_url.indexOf('.ogv') > -1 )
121
+ contentType = 'video/ogg';
122
+
123
+ var v = document.createElement("video");
124
+ var html5 = false;
125
+ if( !!v.canPlayType ) {
126
+ var status = v.canPlayType(contentType);
127
+ if( status == 'probably' || status == 'maybe' ) {
128
+ html5 = true;
129
+ }
130
+ else if( webm_media_url )
131
+ {
132
+ status = v.canPlayType('video/webm');
133
+ if( status == 'probably' || status == 'maybe' ) {
134
+ html5 = true;
135
+ }
136
+ }
137
+ }
138
+
139
+ if( html5 ) {
140
+ var s = document.createElement('source');
141
+ v.width = width; v.height = height; v.controls = true;
142
+ if( poster ) v.poster = poster;
143
+ s.src = media_url; s.type = contentType;
144
+ v.appendChild(s);
145
+ if( webm_media_url ) {
146
+ var s_webm = document.createElement('source');
147
+ s_webm.src = webm_media_url; s_webm.type = 'video/webm; codecs="vp8, vorbis"';
148
+ v.appendChild(s_webm);
149
+ }
150
+
151
+ document.getElementById('powerpress_player_'+id).innerHTML = '';
152
+ document.getElementById('powerpress_player_'+id).appendChild(v);
153
+ v.play();
154
+ } else {
155
+ delete(v);
156
+ pp_flashembed(
157
+ 'powerpress_player_'+id,
158
+ {src: powerpress_url +'FlowPlayerClassic.swf', width: width, height: height, wmode: 'transparent' },
159
+ {config: { autoPlay: true, autoBuffering: true, initialScale: 'scale', showFullScreenButton: false, showMenu: false, videoFile: media_url, loop: false, autoRewind: true, splashImageFile: poster } }
160
+ );
161
+ }
162
+
163
+ if( window.powerpress_resize_player )
164
+ powerpress_resize_player();
165
+
166
+ return false; // stop the default link from proceeding
167
+ }
168
+
169
+ return true; // let the default link to the media open...
170
+ }
171
+
172
+ /**
173
+ Insert embed for audio, with fallback to flash (m4a/mp3/ogg)
174
+
175
+ @div - specific div to insert embed into
176
+ @media_url - URL of media file to play
177
+ @width - width of player
178
+ @height - height of player
179
+ @webm_media_url - Alternative WebM media URL
180
+ */
181
+ function powerpress_embed_html5a(id,media_url)
182
+ {
183
+ if( document.getElementById('powerpress_player_'+id) )
184
+ {
185
+ var poster = '';
186
+ if( document.getElementById('powerpress_player_'+id).getElementsByTagName ) {
187
+ var images = document.getElementById('powerpress_player_'+id).getElementsByTagName('img');
188
+ if( images.length && images[0].src )
189
+ poster = images[0].src;
190
+ }
191
+
192
+ var contentType = 'audio/mpeg'; // Default content type
193
+ if( media_url.indexOf('.m4a') > -1 )
194
+ contentType = 'audio/x-m4a';
195
+ if( media_url.indexOf('.ogg') > -1 || media_url.indexOf('.oga') > -1 )
196
+ contentType = 'audio/ogg';
197
+
198
+ var a = document.createElement("audio");
199
+ var html5 = false;
200
+ if( !!a.canPlayType ) {
201
+ var status = a.canPlayType(contentType);
202
+ if( status == 'probably' || status == 'maybe' ) {
203
+ html5 = true;
204
+ }
205
+ }
206
+
207
+ if( html5 ) {
208
+ var s = document.createElement('source');
209
+ a.controls = true;
210
+ s.src = media_url; s.type = contentType;
211
+ a.appendChild(s);
212
+
213
+ document.getElementById('powerpress_player_'+id).innerHTML = '';
214
+ document.getElementById('powerpress_player_'+id).appendChild(a);
215
+ a.play();
216
+ } else {
217
+ delete(a);
218
+ if( contentType != 'audio/ogg') {
219
+ pp_flashembed(
220
+ 'powerpress_player_'+id,
221
+ {src: powerpress_url +'FlowPlayerClassic.swf', width: 320, height: 24, wmode: 'transparent' },
222
+ {config: { autoPlay: true, autoBuffering: true, initialScale: 'scale', showFullScreenButton: false, showMenu: false, videoFile: media_url, loop: false, autoRewind: true } }
223
+ );
224
+ } else { return true; }
225
+ }
226
+
227
+ return false; // stop the default link from proceeding
228
+ }
229
+
230
+ return true; // let the default link to the media open...
231
+ }
232
+
233
  /**
234
  Insert embed for windows media within specified div
235
 
powerpress-player.php CHANGED
@@ -3,309 +3,1779 @@
3
  PowerPress player options
4
  */
5
 
6
- // Let PowerPress know that the powerpress_player filter event will be handeled
7
- if( !defined('POWERPRESS_PLAYER') )
8
- define('POWERPRESS_PLAYER', true);
9
 
10
- if( !defined('PHP_EOL') )
11
- define('PHP_EOL', "\n"); // We need this variable defined for new lines.
 
 
 
 
 
 
12
 
13
- function powerpressplayer_get_root_url()
14
  {
15
- return WP_PLUGIN_URL . '/'. basename( POWERPRESS_ABSPATH ) .'/';
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
- function powerpressplayer_filter($content, $media_url, $ExtraData = array())
 
 
 
19
  {
20
- $Settings = get_option('powerpress_general');
21
- if( !empty($Settings['display_player_disable_mobile']) && powerpress_is_mobile_client() )
22
- return $content; // lets not add a player for this situation
 
 
 
 
 
 
 
 
23
 
24
- // Check if we are using a custom flash player...
25
- if( !isset($Settings['player']) || $Settings['player'] == 'default' ) // Either the default player is selected or the user never selected a player
26
- return $content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- // Next check that we're working with an mp3
29
- $parts = pathinfo($media_url);
30
- if( strtolower($parts['extension']) != 'mp3' )
31
- return $content; // We're apparently not working with an mp3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
- $player_content = powerpressplayer_build( $media_url, $Settings, $ExtraData );
34
- return $content . $player_content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
- function powerpressplayer_build($media_url, $Settings, $ExtraData = array())
 
38
  {
39
- global $g_powerpress_player_id; // Use the global unique player id variable for the surrounding div
 
 
 
 
 
 
 
 
40
  if( !isset($g_powerpress_player_id) )
41
  $g_powerpress_player_id = rand(0, 10000);
42
- $g_powerpress_player_id++; // increment the player id for the next div so it is unique
43
- $content = '';
44
- $autoplay = false;
 
 
45
  if( isset($ExtraData['autoplay']) && $ExtraData['autoplay'] )
46
- $autoplay = true; // TODO: We need to handle this
 
 
 
47
 
48
- switch( $Settings['player'] )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  {
50
- case 'audio-player': {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
- $PlayerSettings = get_option('powerpress_audio-player');
53
-
54
- if($PlayerSettings == ""):
55
- $PlayerSettings = array(
56
- 'width'=>'290',
57
- 'transparentpagebg' => 'yes',
58
- 'lefticon' => '#333333',
59
- 'leftbg' => '#CCCCCC',
60
- 'bg' => '#E5E5E5',
61
- 'voltrack' => '#F2F2F2',
62
- 'volslider' => '#666666',
63
- 'rightbg' => '#B4B4B4',
64
- 'rightbghover' => '#999999',
65
- 'righticon' => '#333333',
66
- 'righticonhover' => '#FFFFFF',
67
- 'loader' => '#009900',
68
- 'track' => '#FFFFFF',
69
- 'tracker' => '#DDDDDD',
70
- 'border' => '#CCCCCC',
71
- 'skip' => '#666666',
72
- 'text' => '#333333',
73
- 'pagebg' => '',
74
- 'noinfo'=>'yes',
75
- 'rtl' => 'no'
76
- );
77
- endif;
78
-
79
- //$PlayerSettings['noinfo'] = 'yes';
80
- if( $PlayerSettings['titles'] == '' )
81
- $PlayerSettings['titles'] = 'Blubrry PowerPress';
82
- else if( strtoupper($PlayerSettings['titles']) == __('TRACK', 'powerpress') )
83
- unset( $PlayerSettings['titles'] );
84
-
85
- $keys = array_keys($PlayerSettings);
86
- $flashvars ='';
87
- foreach ($keys as $key) {
88
- if($PlayerSettings[$key] != "") {
89
- $flashvars .= '&amp;'. $key .'='. preg_replace('/\#/','',$PlayerSettings[$key]);
90
- }
91
- }
92
-
93
- if( $autoplay )
94
- {
95
- $flashvars .= '&amp;autostart=yes';
96
- }
97
-
98
- if( !isset($PlayerSettings['width']) )
99
- $PlayerSettings['width'] = 290;
100
-
101
- if($PlayerSettings['pagebg'] != ""){
102
- $transparency = '<param name="bgcolor" value="'.$PlayerSettings['pagebg'].'" />';
103
- $PlayerSettings['transparentpagebg'] = "no";
104
- $flashvars .= '&amp;transparentpagebg=no';
105
- $flashvars .= '&amp;pagebg='.$PlayerSettings['pagebg'];
106
- }
107
- else {
108
- $PlayerSettings['transparentpagebg'] = "yes";
109
- $transparency = '<param name="wmode" value="transparent" />';
110
- $flashvars .= '&amp;transparentpagebg=yes';
111
- }
112
- // TODO: Add audio-player player here
113
  $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
114
- //$content .= '<script language="JavaScript" src="'.powerpressplayer_get_root_url().'audio-player.js"></script>'.PHP_EOL;
115
- $content .= '<object type="application/x-shockwave-flash" data="'.powerpressplayer_get_root_url().'audio-player.swf" id="'.$g_powerpress_player_id.'" height="24" width="'. $PlayerSettings['width'] .'">'.PHP_EOL;
116
- $content .= '<param name="movie" value="'.powerpressplayer_get_root_url().'audio-player.swf" />'.PHP_EOL;
117
- $content .= '<param name="FlashVars" value="playerID='.$g_powerpress_player_id.'&amp;soundFile='.urlencode($media_url).$flashvars.'" />'.PHP_EOL;
118
- $content .= '<param name="quality" value="high" />'.PHP_EOL;
119
- $content .= '<param name="menu" value="false" />'.PHP_EOL;
120
- $content .= '<param name="wmode" value="transparent" />'.PHP_EOL;
121
- $content .= '</object>'.PHP_EOL;
122
- $content .= '</div>'.PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
  }; break;
125
- case 'flashmp3-maxi': {
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  $PlayerSettings = get_option('powerpress_flashmp3-maxi');
128
- $keys = array('bgcolor1','bgcolor2','bgcolor','textcolor','buttoncolor','buttonovercolor','showstop','showinfo','showvolume','height','width','showloading','buttonwidth','volume','showslider');
129
-
130
- //set PlayerSettings as blank array for initial setup
131
- //This keeps the foreach loop from returning an error
132
- if($PlayerSettings == ""){
133
- $PlayerSettings = array(
134
- 'bgcolor1'=>'#7c7c7c',
135
- 'bgcolor2'=>'#333333',
136
- 'textcolor' => '#FFFFFF',
137
- 'buttoncolor' => '#FFFFFF',
138
- 'buttonovercolor' => '#FFFF00',
139
- 'showstop' => '0',
140
- 'showinfo' => '0',
141
- 'showvolume' => '1',
142
- 'height' => '20',
143
- 'width' => '200',
144
- 'showloading' => 'autohide',
145
- 'buttonwidth' => '26',
146
- 'volume' => '100',
147
- 'showslider' => '1',
148
- 'slidercolor1'=>'#cccccc',
149
- 'slidercolor2'=>'#888888',
150
- 'sliderheight' => '10',
151
- 'sliderwidth' => '20',
152
- 'loadingcolor' => '#FFFF00',
153
- 'volumeheight' => '6',
154
- 'volumewidth' => '30',
155
- 'sliderovercolor' => '#eeee00'
156
- );
157
- }
158
-
159
- $flashvars = '';
160
- $flashvars .= "mp3=" . urlencode($media_url);
161
- if( $autoplay )
162
- $flashvars .= '&amp;autoplay=1';
163
-
164
- //set non-blank options without dependencies as flash variables for preview
165
- foreach($keys as $key) {
166
- if($PlayerSettings[$key] != "") {
167
- $flashvars .= '&amp;'. $key .'='. preg_replace('/\#/','',$PlayerSettings[''.$key.'']);
168
- }
169
- }
170
- //set slider dependencies
171
- if($PlayerSettings['showslider'] != "0") {
172
- if($PlayerSettings['sliderheight'] != "") {
173
- $flashvars .= '&amp;sliderheight='. $PlayerSettings['sliderheight'];
174
- }
175
- if($PlayerSettings['sliderwidth'] != "") {
176
- $flashvars .= '&amp;sliderwidth='. $PlayerSettings['sliderwidth'];
177
- }
178
- if($PlayerSettings['sliderovercolor'] != ""){
179
- $flashvars .= '&amp;sliderovercolor='. preg_replace('/\#/','',$PlayerSettings['sliderovercolor']);
180
- }
181
- }
182
- //set volume dependencies
183
- if($PlayerSettings['showvolume'] != "0") {
184
- if($PlayerSettings['volumeheight'] != "") {
185
- $flashvars .= '&amp;volumeheight='. $PlayerSettings['volumeheight'];
186
- }
187
- if($PlayerSettings['volumewidth'] != "") {
188
- $flashvars .= '&amp;volumewidth='. $PlayerSettings['volumewidth'];
189
- }
190
- }
191
- //set autoload dependencies
192
- if($PlayerSettings['showloading'] != "never") {
193
- if($PlayerSettings['loadingcolor'] != "") {
194
- $flashvars .= '&amp;loadingcolor='. preg_replace('/\#/','',$PlayerSettings['loadingcolor']);
195
- }
196
- }
197
-
198
-
199
- //set default width for object
200
- if($PlayerSettings['width'] == ""){
201
- $width = "200";
202
- }else{
203
- $width = $PlayerSettings['width'];
204
- }
205
- if($PlayerSettings['height'] == ""){
206
- $height = "20";
207
- }else{
208
- $height = $PlayerSettings['height'];
209
- }
210
-
211
- //set background transparency
212
- if($PlayerSettings['bgcolor'] != ""){
213
- $transparency = '<param name="bgcolor" value="'. $color7 .'" />';
214
- }else{
215
- $transparency = '<param name="wmode" value="transparent" />';
216
- }
217
-
218
- //set flashvars
219
- if($flashvars != ""){
220
- $flashvars= '<param name="FlashVars" value="'. $flashvars .'" />'.PHP_EOL;
221
- }
222
-
223
-
224
-
225
- // TODO: Add flashmp3-maxi player here
226
- $content = '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">'.PHP_EOL;
227
- $content .= '<object type="application/x-shockwave-flash" data="'. powerpressplayer_get_root_url().'player_mp3_maxi.swf" id="'.$g_powerpress_player_id.'" width="'. $width.'" height="'. $height .'">'.PHP_EOL;
228
- $content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'player_mp3_maxi.swf" />'.PHP_EOL;
229
- $content .= $transparency.PHP_EOL;
230
- $content .= $flashvars;
231
- $content .= '</object>'.PHP_EOL;
232
- $content .= '</div>'.PHP_EOL;
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
 
 
235
  }; break;
236
- case 'audioplay' : {
237
-
238
- $PlayerSettings = get_option('powerpress_audioplay');
239
- if($PlayerSettings == "") {
240
- $PlayerSettings = array(
241
- 'bgcolor' => '',
242
- 'buttondir' => 'negative',
243
- 'mode' => 'playpause'
244
- );
245
- }
246
-
247
- $width = $height = (strstr($PlayerSettings['buttondir'], 'small')===false?30:15);
248
-
249
- // Set standard variables for player
250
- $flashvars = 'file='.urlencode($media_url) ;
251
- $flashvars .= '&amp;repeat=1';
252
- if( $autoplay )
253
- $flashvars .= '&amp;auto=yes';
254
-
255
- if($PlayerSettings['bgcolor'] == ""){
256
- $flashvars .= "&amp;usebgcolor=no";
257
- $transparency = '<param name="wmode" value="transparent" />';
258
- $htmlbg = "";
259
- }
260
- else{
261
- $flashvars .= "&amp;bgcolor=". preg_replace('/\#/','0x',$PlayerSettings['bgcolor']);
262
- $transparency = '<param name="bgcolor" value="'. $PlayerSettings['bgcolor']. '" />';
263
- $htmlbg = 'bgcolor="'. $PlayerSettings['bgcolor'].'"';
264
-
265
- }
266
-
267
- if($PlayerSettings['buttondir'] == "") {
268
- $flashvars .= "&amp;buttondir=".powerpressplayer_get_root_url()."buttons/negative";
269
- }else{
270
- $flashvars .= "&amp;buttondir=".powerpressplayer_get_root_url().'buttons/'.$PlayerSettings['buttondir'];
271
-
272
- }
273
-
274
- $flashvars .= '&amp;mode='. $PlayerSettings['mode'];
275
-
276
- // TODO: Add audioplay player here
277
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
278
- $content .= '<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" id="'.$g_powerpress_player_id.'" data="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'">'.PHP_EOL;
279
- $content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'" />'.PHP_EOL;
280
- $content .= '<param name="quality" value="high" />'.PHP_EOL;
281
- $content .= $transparency.PHP_EOL;
282
- $content .= '<param name="FlashVars" value="'.$flashvars.'" />'.PHP_EOL;
283
- $content .= '<embed src="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'" quality="high" width="30" height="30" type="application/x-shockwave-flash">'.PHP_EOL;
284
- $content .= "</embed>\n </object>\n";
285
- $content .= "</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  }; break;
288
- case 'simple_flash' : {
289
- $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
290
- $content .= '<object type="application/x-shockwave-flash" data="'. powerpressplayer_get_root_url() .'simple_mp3.swf" id="'.$g_powerpress_player_id.'" width="150" height="50">';
291
- $content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'simple_mp3.swf" />';
292
- $content .= '<param name="wmode" value="transparent" />';
293
- $content .= '<param name="FlashVars" value="'. get_bloginfo('url') .'?url='. urlencode($media_url).'&amp;autostart='. ($autostart?'true':'false') .'" />';
294
- $content .= '<param name="quality" value="high" />';
295
- $content .= '<embed wmode="transparent" src="'. get_bloginfo('url') .'?url='.urlencode($media_url).'&amp;autostart='. ($autostart?'true':'false') .'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="50"></embed>';
296
- $content .= '</object>';
297
- $content .= "</div>\n";
298
- }; break;
299
- // Let all other cases fall through...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  return $content;
303
  }
304
 
305
- // Hook into the powerprss_player filter
306
- add_filter('powerpress_player', 'powerpressplayer_filter', 10, 3);