# siteCONFIG Question ...

**URL:** <https://forums.plex.tv/t/siteconfig-question/1722>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [May 10, 2009, 3:34pm UTC](https://forums.plex.tv/t/siteconfig-question/1722 "2009-05-10T15:34:21Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![rnio](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rnio/32/388_2.png) [@rnio](https://forums.plex.tv/u/rnio)\
**Post date:** [May 10, 2009, 3:34pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/1 "2009-05-10T15:34:21Z")

</div>

Hi,  
  
  
  
I tried my first FLASH video playback.  
  
  
  
I created the siteconfig file and put it into the Site Config bundle where all the others are.  
  
  
  
Q1: The NAME of my xml files does NOT really matter?  
  
  
  
This is the file:  
  
  
  
[codebox]\<?xml version="1.0" encoding="UTF-8"?\>  
  
\<site site=“http://\*.rtl.de”  
  
plugin=“http://\*[rtl.de/includes/rtlnow\_videoplayer09\_2](http://rtl.de/includes/rtlnow_videoplayer09_2)”  
  
initialState=“playing”  
  
version=“1.0”\>  
  
  
  
  
  
\<crop x=“69” y=“303” width="594 height=“370” /\>  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
\<click x="21 y="351/\>  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
\<click x="21 y="351/\>  
  
  
  
  
  
  
  
  
  
[/codebox]  
  
  
  
This is the content of my “test.strm” file, the one which I select within plex:  
  
  
  
[codebox]plex://localhost/video/:/webkit?url=http://rtl-now.rtl.de/explosiv.php?player=1&play\_last=1[/codebox]  
  
  
  
The URL works fine with SAFARI: [Try it !](http://rtl-now.rtl.de/explosiv.php?player=1&play_last=1)  
  
  
  
This is the LOG of an unsuccessful attempt:  
  
  
  
[codebox]08:29:54 T:2693658400 M:2712227840 DEBUG: CFileSMB::Open - opened MyVideo/xbox/Test.strm, fd=10000  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: CFileSMB::Close closing fd 10000  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: new file set audiostream:0  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: CPlayerCoreFactor::GetPlayers(plex://localhost/video/:/webkit?url=http://rtl-now.rtl.de/explosiv.php?player=1&play\_last=1)  
  
08:29:54 T:2693658400 M:2712227840 INFO: Loading skin file: DialogProgress.xml  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: Load DialogProgress.xml: 1.48ms (0.39 ms xml load)  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: DialogProgress::StartModal called  
  
08:29:54 T:2693658400 M:2712227840 DEBUG:   
  
08:29:54 T:2693658400 M:2712227840 DEBUG: ------------------- GUI\_MSG\_WINDOW\_INIT  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: Progress dialog  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: -------------------  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: Load OSDProgressBack.png: 0.0ms (bundled)  
  
08:29:54 T:2693658400 M:2712227840 DEBUG: Load OSDProgressMid.png: 0.0ms (bundled)  
  
08:29:54 T:2693658400 M:2711670784 DEBUG: Load DialogBigButtonFO.png: 0.2ms (bundled)  
  
08:29:54 T:2693658400 M:2711638016 DEBUG: Load DialogBigButtonNF.png: 0.2ms (bundled)  
  
08:29:54 T:2693658400 M:2711638016 DEBUG: Alloc resources: 1.55ms (0.04 ms skin load, 0.13 ms preload)  
  
08:29:54 T:2981642240 M:2711629824 DEBUG: Running thread 2981642240  
  
08:29:54 T:2981642240 M:2711629824 DEBUG: thread start, auto delete: 1  
  
08:29:54 T:2693658400 M:2711597056 DEBUG: CHTTP::ParseHeaders(headers=Content-Length: 89  
  
Content-Type: text/html  
  
X-PMS-Protocol: 1.0  
  
  
  
)  
  
08:29:54 T:2693658400 M:2711597056 DEBUG: CHTTP::ParseHeader(start=0, colon=14, end=18)  
  
08:29:54 T:2693658400 M:2711597056 DEBUG: CHTTP::ParseHeader(start=20, colon=32, end=43)  
  
08:29:54 T:2693658400 M:2711597056 DEBUG: CHTTP::ParseHeader(start=45, colon=59, end=64)  
  
08:29:54 T:2693658400 M:2711597056 DEBUG: CHTTP::ParseHeader(start=66, colon=0, end=66)  
  
08:29:54 T:2693658400 M:2711597056 DEBUG: CHTTP::ParseHeader(start=68, colon=0, end=68)  
  
08:29:54 T:2693658400 M:2711597056 ERROR: Server returned: 400 Bad Request  
  
08:29:54 T:2693658400 M:2711629824 ERROR: Playlist Player: skipping unplayable item: 0, path [plex://localhost/video/:/webkit?url=http://rtl-now.rtl.de/explosiv.php?player=1&play\_last=1]  
  
08:29:54 T:2693658400 M:2711629824 DEBUG: Playlist Player: too many consecutive failures… aborting playback  
  
[/codebox]  
  
  
  
  
  
Q2: Why do I get a “400 BAD REQUEST” error?

---

<div class="post-metadata">

**Author:** ![jam](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jam/32/186050_2.png) [@jam](https://forums.plex.tv/u/jam)\
**Post date:** [May 10, 2009, 3:36pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/2 "2009-05-10T15:36:14Z")

</div>

The “[http://rtl-now.rtl.de/explosiv.php?player=1&play\_last=1](http://rtl-now.rtl.de/explosiv.php?player=1&play_last=1)” part in the STRM file needs to be URL encoded.

---

<div class="post-metadata">

**Author:** ![rnio](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rnio/32/388_2.png) [@rnio](https://forums.plex.tv/u/rnio)\
**Post date:** [May 10, 2009, 8:02pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/3 "2009-05-10T20:02:53Z")

</div>

> [@](#):
>
> The “[http://rtl-now.rtl.de/explosiv.php?player=1&play\_last=1](http://rtl-now.rtl.de/explosiv.php?player=1&play_last=1)” part

  
  
URL encoded ==\> http%3A%2F%2Frtl-now.rtl.de%2Fexplosiv.php%3Fplayer%3D1%26play\_last%3D1  
  
  
results in a "Server returned: 503 Service Unavailable" error ?!  
  
I guess the PROBLEM is the correct flash player:  
[codebox] 
  
  

RTL Explosiv - Sendung vom 09.05.2009
  
  
  

  
  
  
  
  
 \<script  
 language="javascript"\> DetectFlashVer = 0; \<script  
 src="/includes/aufmacher/AC\_RunActiveContent.js" language="javascript"\>  
  
  
  

  

  
  
  
[/codebox]  
  
Any ideas ?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [May 11, 2009, 4:52am UTC](https://forums.plex.tv/t/siteconfig-question/1722/4 "2009-05-11T04:52:53Z")

</div>

```auto

Q1: The NAME of my xml files does NOT really matter?

```

  
  
Correct, it doesn't matter.  
  

```auto

http://*.rtl.de

```

  
  
The site and plug-in strings are regular expressions, so you'll need to do something like this:  
  

```auto

http://.*\.rtl\.de

```

---

<div class="post-metadata">

**Author:** ![rnio](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rnio/32/388_2.png) [@rnio](https://forums.plex.tv/u/rnio)\
**Post date:** [May 11, 2009, 5:19am UTC](https://forums.plex.tv/t/siteconfig-question/1722/5 "2009-05-11T05:19:59Z")

</div>

I am a step closer …  
  
  
  
My xml file was NOT correct. I made a few stupid mistakes e.g missing \<’\> etc.  
  
  
  
I found out about them when I started looking into the general MAC-MINI log files.  
  
  
  
SUGGESTION:   
  
  
  
Please make a logfile for the SITE-CONFIG, similar to what you have for the plug-ins. Messages about XML parsing errors should all show up here.  
  
  
  
Q1:  
  
The DOC about making a site config file is good … but would be better, if it was a little clearer about the COORDINATES. e.g. the starting x/y of the “CROP” is always 0 … why do we have to specify this at all? I thought this was the x/y of the FLASH windows within the page?! The other coordinates are they relative to this initial page? Once you understand this … all is simple … but coming from nowhere … these things are not that obvious.  
  
  
  
Q2:  
  
How can I tell if the CLICK was executed (to switch from “playing” ==\> “pausing”)? The stream is getting pulled … I get some META-DATA (title etc.) back from the site … just before the FLASH screen pop up … but then nothing happens. The COORDINATES I used for CLICK are relative to the flash-screen (top left is 0/0).  
  
  
  
Thanks for the quick replies.  
  
  
  
BTW, great new version 8 !

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [May 11, 2009, 9:07am UTC](https://forums.plex.tv/t/siteconfig-question/1722/6 "2009-05-11T09:07:47Z")

</div>

> [@](#):
>
> The DOC about making a site config file is good … but would be better, if it was a little clearer about the COORDINATES. e.g. the starting x/y of the “CROP” is always 0 … why do we have to specify this at all? I thought this was the x/y of the FLASH windows within the page?! The other coordinates are they relative to this initial page? Once you understand this … all is simple … but coming from nowhere … these things are not that obvious.

  
  
Totally understand and we have documentation in the works.  
  
Starting X/Y for crop might not be zero, there are plenty of sites that that garbage/borders to the top/left of the video. "grep" around in the existing site configs to see. All coordinates are respect to the Flash plug-in region, not the page, starting at 0,0 regardless of where the plug-in is on the page. Hope that made sense :)  
  

> [@](#):
>
> How can I tell if the CLICK was executed (to switch from “playing” ==\> “pausing”)? The stream is getting pulled … I get some META-DATA (title etc.) back from the site … just before the FLASH screen pop up … but then nothing happens. The COORDINATES I used for CLICK are relative to the flash-screen (top left is 0/0).

  
  
We recommend running the media server from the command line for now to see some debug output in the terminal window, or you can watch the output from the Console. We'll be adding more debugging facilities as time goes on.  
  
Thanks for your comments and suggestions!

---

<div class="post-metadata">

**Author:** ![rnio](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rnio/32/388_2.png) [@rnio](https://forums.plex.tv/u/rnio)\
**Post date:** [May 12, 2009, 4:08am UTC](https://forums.plex.tv/t/siteconfig-question/1722/7 "2009-05-12T04:08:32Z")

</div>

Thanks to elan … here is how to get the PMS running from the command prompt:  
  
  
  
[codebox]  
  
Start a Terminal  
  
  
  
then type  
  
  
  
$ killall “Plex Media Server”  
  
  
  
this will kill an existing one  
  
  
  
then you type:  
  
  
  
$ ~/Library/Application\ Support/Plex/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server  
  
  
  
(you can copy and paste this, but leave off the “$”, of course)  
  
  
  
[/codebox]  
  
  
  
This should help get more detailed feedback when working with site-config files …  
  
  
  
Thanks elan 🙂

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [June 19, 2009, 12:15pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/8 "2009-06-19T12:15:35Z")

</div>

Hi other questions about siteConfig.  
  
  
  
1 - I think that I’ve crop correctly the image in the player but when I play the video in Plex I’ve black space on the right and the left of the video.   
  
Any clue to explain that ?  
  
  
  
2 - In the siteconfig file bellow. I notice that when I play a video, it starts and the first time I press “space bar” nothing append. the second time, the video is paused and then I can switch between play and pause like it is planned.   
  
Any explication for the first press of space bar ?  
  
  
  
[codebox]\<?xml version="1.0" encoding="UTF-8"?\>  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
[/codebox]

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [June 19, 2009, 9:06pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/9 "2009-06-19T21:06:03Z")

</div>

> [@](#):
>
> 1 - I think that I’ve crop correctly the image in the player but when I play the video in Plex I’ve black space on the right and the left of the video.   
>   
> Any clue to explain that ?

  
  
You can try selecting the Flash Player in Safari with the mouse so you can see where it starts and ends. It could be bigger than it looks.  
  

> [@](#):
>
> 2 - In the siteconfig file bellow. I notice that when I play a video, it starts and the first time I press “space bar” nothing append. the second time, the video is paused and then I can switch between play and pause like it is planned.   
>   
> Any explication for the first press of space bar ?

  
  
Sometimes the mouse clicks aren't 100% reliable (for a variety of reasons). You can try executing an initial click (anywhere) in a fake initial state to see if that helps with the second click.

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [June 20, 2009, 1:20pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/10 "2009-06-20T13:20:55Z")

</div>

thanks Elan for your answers.

> [@](#):
>
> You can try selecting the Flash Player in Safari with the mouse so you can see where it starts and ends. It could be bigger than it looks.

  
In fact it's seems to come from the "type of view" in the video settings during the video is playing.  
Is there a way to specify which type of view to use within the plugin ?  
  
  
  

> [@](#):
>
> Sometimes the mouse clicks aren’t 100% reliable (for a variety of reasons). You can try executing an initial click (anywhere) in a fake initial state to see if that helps with the second click.

  
I will try it, thanks

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [July 1, 2009, 10:02am UTC](https://forums.plex.tv/t/siteconfig-question/1722/11 "2009-07-01T10:02:40Z")

</div>

> [@](#):
>
> In fact it’s seems to come from the “type of view” in the video settings during the video is playing.  
>   
> Is there a way to specify which type of view to use within the plugin ?

  
  
Anybody to help me on this subject ?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 1, 2009, 9:56pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/12 "2009-07-01T21:56:15Z")

</div>

One possibility would be to set an initial state in the site config and click on the button that selects the view type (assuming it’s in Flash). You can also execute Javascript if this helps.

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [July 2, 2009, 7:49am UTC](https://forums.plex.tv/t/siteconfig-question/1722/13 "2009-07-02T07:49:06Z")

</div>

> [@](#):
>
> One possibility would be to set an initial state in the site config and click on the button that selects the view type (assuming it’s in Flash). You can also execute Javascript if this helps.

  
Thanks elan but it is not in the siteConfig. I wasn't clear enought.   
The "Type View" setting is in Plex. I don't know the real name of this settings in english (I'm la French user) but this is the one which allow to zoom in the picture or crop the black bars. It is accessible when you play a movie.  
My question is : is it possible in the plugin code to set a default value for this preference ?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 3, 2009, 10:02pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/14 "2009-07-03T22:02:19Z")

</div>

Ah, sorry, there is no way to specify this, at least at the moment. We recommend solving the problem with a crop in the site config if it’s possible. Are there different sizes of videos, or is it just not possible for some other reason to crop in the site config?  
  
  
  
Cheers 🙂

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [July 4, 2009, 6:37am UTC](https://forums.plex.tv/t/siteconfig-question/1722/15 "2009-07-04T06:37:49Z")

</div>

I’ve started to test the crop of the image in the siteConfig but since I found a way to have the flv file directly.   
  
With it I’ve allways the “type view” issue but no solution to crop.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 6, 2009, 1:16am UTC](https://forums.plex.tv/t/siteconfig-question/1722/16 "2009-07-06T01:16:13Z")

</div>

> [@](#):
>
> I’ve started to test the crop of the image in the siteConfig but since I found a way to have the flv file directly.   
>   
> With it I’ve allways the “type view” issue but no solution to crop.

  
  
It sounds like the video itself has black borders on it? I've run into a few sites like this and there's no really good solution I've found, besides doing the crop in the site config if the video size is constant.  
  
Using the actual video file is usually better, though :)

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [July 6, 2009, 7:38pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/17 "2009-07-06T19:38:21Z")

</div>

I split to another thread since this is no more related to siteConfig. To be continued[here](http://forums.plexapp.com/index.php?showtopic=7650)

---

<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 20, 2019, 8:26pm UTC](https://forums.plex.tv/t/siteconfig-question/1722/18 "2019-12-20T20:26:24Z")

</div>

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