{"action":"created","issue":{"url":"https://api.github.com/repos/lucisgit/moodle-filter_jwplayer/issues/20","labels_url":"https://api.github.com/repos/lucisgit/moodle-filter_jwplayer/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/lucisgit/moodle-filter_jwplayer/issues/20/comments","events_url":"https://api.github.com/repos/lucisgit/moodle-filter_jwplayer/issues/20/events","html_url":"https://github.com/lucisgit/moodle-filter_jwplayer/issues/20","id":79082224,"number":20,"title":"make player features available though filter","user":{"login":"jojoob","id":4180675,"avatar_url":"https://avatars.githubusercontent.com/u/4180675?v=3","gravatar_id":"","url":"https://api.github.com/users/jojoob","html_url":"https://github.com/jojoob","followers_url":"https://api.github.com/users/jojoob/followers","following_url":"https://api.github.com/users/jojoob/following{/other_user}","gists_url":"https://api.github.com/users/jojoob/gists{/gist_id}","starred_url":"https://api.github.com/users/jojoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojoob/subscriptions","organizations_url":"https://api.github.com/users/jojoob/orgs","repos_url":"https://api.github.com/users/jojoob/repos","events_url":"https://api.github.com/users/jojoob/events{/privacy}","received_events_url":"https://api.github.com/users/jojoob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-21T17:01:58Z","updated_at":"2015-05-22T10:33:09Z","closed_at":null,"body":"I think it would be great if the additional player features are accessible through the filter functionality.\r\nThis could be achieved by parsing additional url get params and passing them to the renderer as option parameter. Or maybe there is an alternative solution?\r\n\r\nI've implemented a prototype that excepts url get params for subtitle tracks (sub-*), poster image (image) and customid within the href url. But I doesn't really understand the `$urls = explode('#', $combinedurl);` part in filter_jwplayer_split_alternatives function. In what circumstances a \"combinedurl\" is passed to the function?\r\n\r\nPrototype: https://github.com/sudile/moodle-filter_jwplayer/blob/dev-filterparams/lib.php#L61"},"comment":{"url":"https://api.github.com/repos/lucisgit/moodle-filter_jwplayer/issues/comments/104613102","html_url":"https://github.com/lucisgit/moodle-filter_jwplayer/issues/20#issuecomment-104613102","issue_url":"https://api.github.com/repos/lucisgit/moodle-filter_jwplayer/issues/20","id":104613102,"user":{"login":"kabalin","id":329780,"avatar_url":"https://avatars.githubusercontent.com/u/329780?v=3","gravatar_id":"","url":"https://api.github.com/users/kabalin","html_url":"https://github.com/kabalin","followers_url":"https://api.github.com/users/kabalin/followers","following_url":"https://api.github.com/users/kabalin/following{/other_user}","gists_url":"https://api.github.com/users/kabalin/gists{/gist_id}","starred_url":"https://api.github.com/users/kabalin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabalin/subscriptions","organizations_url":"https://api.github.com/users/kabalin/orgs","repos_url":"https://api.github.com/users/kabalin/repos","events_url":"https://api.github.com/users/kabalin/events{/privacy}","received_events_url":"https://api.github.com/users/kabalin/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T10:33:09Z","updated_at":"2015-05-22T10:33:09Z","body":"Hello Johannes!\r\n\r\n_split_alternatives is originally coming from here https://github.com/moodle/moodle/blob/master/lib/medialib.php#L115 and implemented in jwplayer for compatibility, the idea of this split is to allow more than one link to the same video If, say, you have one mp4 and another one hls stream, you may combine them into one URL, then the player embed them both and let browser/device to decide which one to use. I personally do not like the idea of using '#', because it is reserved symbol in URL for anchor, but we can't do much here.\r\n\r\nRegarding parameters, it is a nice idea, but again, the question is how to deal with splitting? The alternative way could be using [data attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) in the tag, e.g. `<a href=\"./video.mp4\" data-image=\"./image.jpg\" data-playerid=\"player1\" data-sub-en=\"./subtitles.vtt\">video</a>`.\r\n\r\nThough, this approach with data attributes might be correct semantically, I think this is reinvention of the wheel. If it were possible to embed JW Player on exisitng <video> tag, the problems would be solved altogehter, because it already has functionality for specifying multiple files, subtitles, title images and many other parameters. But at the moment JW Player only works with empty \"div\" and custom JS init object unfortinately."}}