Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Allow relative URIs

5 replies [Last post]
Reply

Please allow relative URIs like //www.example.org/path/to.file

patch:

28e0d88acb57389699cb15f5cf12330deef73138
js/jwplayer/jwplayer.js |    4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/js/jwplayer/jwplayer.js b/js/jwplayer/jwplayer.js
index 87e9b71..b963c89 100644
--- a/js/jwplayer/jwplayer.js
+++ b/js/jwplayer/jwplayer.js
@@ -315,6 +315,10 @@ if (typeof jwplayer == "undefined") {
             if (!c.utils.exists(b)) {
                 return
             }
+           if (b.indexOf("//") == 0) {
+               // URI like //www.example.org/path/to.file
+               return true
+           }
             var a = b.indexOf("://");
             var f = b.indexOf("?");
             return (a > 0 && (f < 0 || (f > a)))

Regards
RS

Reply

Not sure I understand which type of relative URLs you're talking about. We support three types of referencing:

1. Absolute: "http://example.com/assets/video.mp4"
2. Relative to home page: "/assets/video.mp4"
3. Relative to current page: "../assets/video.mp4"

Reply

Do 2 and 3 work for all file references now eg movie files and xml config files etc ?

I used to have problems with that and everything ended up being absolute.

Reply

All of these should work fine.

Reply

How about support for publishing points addresses, like: media.domain.edu/publishingpoint/filename.wmv

Reply

I'm not sure what you mean with this? WMV is not supported either way. An RTMP live stream is supported.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options