# Embedded SWF player

**URL:** <https://forums.plex.tv/t/embedded-swf-player/51517>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [December 27, 2013, 8:32pm UTC](https://forums.plex.tv/t/embedded-swf-player/51517 "2013-12-27T20:32:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeneam](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jeneam](https://forums.plex.tv/u/jeneam)\
**Post date:** [December 27, 2013, 8:32pm UTC](https://forums.plex.tv/t/embedded-swf-player/51517/1 "2013-12-27T20:32:38Z")

</div>

Hi ,&nbsp;

It's my first time when I'm posting a question on forum, so I hope I'm doing it in right place.

Trying to develop my first video channel plugin for&nbsp;[http://smotruonline.ru/](http://smotruonline.ru/). i'm able to play flv files but can't do this for SWF players.

I'm doing in this way.

&nbsp;

&nbsp;here is how it look in a web page.

&nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; \<embed src="\<a data-ipb='nomediaparse' href='http://whitecdn.org/player/76fb851c2e71150f8f38a1af23c55b86/player.swf'\>http://whitecdn.org/player/76fb851c2e71150f8f38a1af23c55b86/player.swf\</a\>" quality="high" bgcolor="#000000" width="640" height="405" name="player" &nbsp;align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" &nbsp;flashvars="videoID=78948"\>

&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp;Site Config.

&nbsp; &nbsp;location: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/SmotruOnline.bundle/Contents/Site Configurations

&nbsp; &nbsp;\<?xml version="1.0" encoding="utf-8"?\>

&nbsp; &nbsp;\<site site="http://.\*\<a data-ipb='nomediaparse' href='http://smotruonline.ru/'\>smotruonline.ru\</a\>/.\*"

&nbsp; &nbsp; plugin="http://.\*player.swf"

&nbsp; &nbsp; initialState="playing"

&nbsp; &nbsp; windowWidth="640"

&nbsp; &nbsp; windowHeight="405"

&nbsp; &nbsp; ...

&nbsp;

&nbsp; &nbsp; in Code.

&nbsp; &nbsp; def MainMenu():

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dir = MediaContainer()

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dir.Append(Function(WebVideoItem(VideoPlayer, title="Test", subtitle='', thumb='[http://smotruonline.ru/uploads/posts/2013-12/1388055019\_smotruonline.ru\_putiwesvia.k.rojdesvenskoy.zvezde.2012.jpg](http://smotruonline.ru/uploads/posts/2013-10/1382357526_smotruonline.ru_belyy-vorotnichok-2013.jpg)'), url='[http://whitecdn.org/player/76fb851c2e71150f8f38a1af23c55b86/player.swf](http://whitecdn.org/player/76fb851c2e71150f8f38a1af23c55b86/player.swf)'))

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return dir

&nbsp;

&nbsp; &nbsp;&nbsp;

&nbsp;

&nbsp; &nbsp; def VideoPlayer(sender, url):

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return Redirect(WebVideoItem(url))

&nbsp;

&nbsp;

But unfortunately don't work.

Here is what I get in logs.

&nbsp;/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/PMS\ Plugin\ Logs/com.plexapp.plugins.smotruonline.log

2013-12-27 12:46:43,312 (7fda017fa700) : &nbsp;DEBUG (runtime:106) - Sending packed state data (549 bytes)

2013-12-27 12:46:43,313 (7fda017fa700) : &nbsp;DEBUG (runtime:915) - Response: [200] MediaContainer, 950 bytes

2013-12-27 12:46:44,523 (7fda017fa700) : &nbsp;DEBUG (runtime:717) - Handling request GET /video/SmotruOnline/:/function/VideoPlayer?function\_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAoyCnM3MApodHRwOi8vd2hpdGVjZG4ub3JnL3BsYXllci83NmZiODUxYzJlNzExNTBmOGYzOGExYWYyM2M1NWI4Ni9wbGF5ZXIuc3dmczMKdXJscjIKczYKc2VuZGVyNQpzMTkKV2F0Y2ggRXVyb25ld3MgbGl2ZXM5Cml0ZW1UaXRsZXMxOQpTbW90cnVPbmxpbmUgUGx1Z2luczYKdGl0bGUxczQKTm9uZXM2CnRpdGxlMnM0Ck5vbmVzMwphcnRzOTgKaHR0cDovL3Ntb3RydW9ubGluZS5ydS91cGxvYWRzL3Bvc3RzLzIwMTMtMTAvMTM4MjM1NzUyNl9zbW90cnVvbmxpbmUucnVfYmVseXktdm9yb3RuaWNob2stMjAxMy5qcGdzNQp0aHVtYnIxCnIwCg\_\_

2013-12-27 12:46:44,525 (7fda017fa700) : &nbsp;DEBUG (runtime:49) - Received packed state data (516 bytes)

2013-12-27 12:46:44,547 (7fda017fa700) : &nbsp;DEBUG (runtime:814) - Found route matching /video/SmotruOnline/:/function/VideoPlayer

2013-12-27 12:46:44,547 (7fda017fa700) : &nbsp;DEBUG (runtime:143) - Calling function 'VideoPlayer'

2013-12-27 12:46:44,550 (7fda017fa700) : &nbsp;DEBUG (runtime:106) - Sending packed state data (549 bytes)

2013-12-27 12:46:44,550 (7fda017fa700) : &nbsp;DEBUG (runtime:915) - Response: [302] Redirect, 0 bytes \<\< that redirect don't look good but not sure what can do

&nbsp;

And&nbsp;

/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log

Dec 27, 2013 12:46:44 [0x7fc99bfff700] DEBUG - HTTP requesting to: [http://127.0.0.1:48172/video/SmotruOnline/:/function/VideoPlayer?function\_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAoyCnM3MApodHRwOi8vd2hpdGVjZG4ub3JnL3BsYXllci83NmZiODUxYzJlNzExNTBmOGYzOGExYWYyM2M1NWI4Ni9wbGF5ZXIuc3dmczMKdXJscjIKczYKc2VuZGVyNQpzMTkKV2F0Y2ggRXVyb25ld3MgbGl2ZXM5Cml0ZW1UaXRsZXMxOQpTbW90cnVPbmxpbmUgUGx1Z2luczYKdGl0bGUxczQKTm9uZXM2CnRpdGxlMnM0Ck5vbmVzMwphcnRzOTgKaHR0cDovL3Ntb3RydW9ubGluZS5ydS91cGxvYWRzL3Bvc3RzLzIwMTMtMTAvMTM4MjM1NzUyNl9zbW90cnVvbmxpbmUucnVfYmVseXktdm9yb3RuaWNob2stMjAxMy5qcGdzNQp0aHVtYnIxCnIwCg\_\_](http://127.0.0.1:48172/video/SmotruOnline/:/function/VideoPlayer?function_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAoyCnM3MApodHRwOi8vd2hpdGVjZG4ub3JnL3BsYXllci83NmZiODUxYzJlNzExNTBmOGYzOGExYWYyM2M1NWI4Ni9wbGF5ZXIuc3dmczMKdXJscjIKczYKc2VuZGVyNQpzMTkKV2F0Y2ggRXVyb25ld3MgbGl2ZXM5Cml0ZW1UaXRsZXMxOQpTbW90cnVPbmxpbmUgUGx1Z2luczYKdGl0bGUxczQKTm9uZXM2CnRpdGxlMnM0Ck5vbmVzMwphcnRzOTgKaHR0cDovL3Ntb3RydW9ubGluZS5ydS91cGxvYWRzL3Bvc3RzLzIwMTMtMTAvMTM4MjM1NzUyNl9zbW90cnVvbmxpbmUucnVfYmVseXktdm9yb3RuaWNob2stMjAxMy5qcGdzNQp0aHVtYnIxCnIwCg__)

Dec 27, 2013 12:46:44 [0x7fc99bfff700] DEBUG - [com.plexapp.plugins.smotruonline] HTTP reply status 302, with 0 bytes of content.

Dec 27, 2013 12:46:44 [0x7fc99bfff700] VERBOSE - Completed request: GET /video/SmotruOnline/:/function/VideoPlayer?function\_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAoyCnM3MApodHRwOi8vd2hpdGVjZG4ub3JnL3BsYXllci83NmZiODUxYzJlNzExNTBmOGYzOGExYWYyM2M1NWI4Ni9wbGF5ZXIuc3dmczMKdXJscjIKczYKc2VuZGVyNQpzMTkKV2F0Y2ggRXVyb25ld3MgbGl2ZXM5Cml0ZW1UaXRsZXMxOQpTbW90cnVPbmxpbmUgUGx1Z2luczYKdGl0bGUxczQKTm9uZXM2CnRpdGxlMnM0Ck5vbmVzMwphcnRzOTgKaHR0cDovL3Ntb3RydW9ubGluZS5ydS91cGxvYWRzL3Bvc3RzLzIwMTMtMTAvMTM4MjM1NzUyNl9zbW90cnVvbmxpbmUucnVfYmVseXktdm9yb3RuaWNob2stMjAxMy5qcGdzNQp0aHVtYnIxCnIwCg\_\_: 302

&nbsp;

&nbsp;

Does anybody had this problem before and how I can handle it ?

Thanks

PS. &nbsp;Sorry for my English , not native speaker.

&nbsp;

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [December 27, 2013, 9:35pm UTC](https://forums.plex.tv/t/embedded-swf-player/51517/2 "2013-12-27T21:35:42Z")

</div>

Webkit (Flash or Silverlight based channels that required a site config) is no longer supported. You probably need to dig a little bit deeper and find the source video file played back by the Flash player.

---

<div class="post-metadata">

**Author:** ![jeneam](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jeneam](https://forums.plex.tv/u/jeneam)\
**Post date:** [December 27, 2013, 10:13pm UTC](https://forums.plex.tv/t/embedded-swf-player/51517/3 "2013-12-27T22:13:15Z")

</div>

Hi Sander1,

Thanks for prompt answer.

I'm already started work on a script based on webkit to grub source file.

Is there a way to integrate it with plugin or I have to run it separately and pass a JSON for example to plugin in Resources ?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 12:49am UTC](https://forums.plex.tv/t/embedded-swf-player/51517/4 "2019-12-21T00:49:08Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
