{"action":"created","issue":{"url":"https://api.github.com/repos/johndyer/mediaelement/issues/59","labels_url":"https://api.github.com/repos/johndyer/mediaelement/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/johndyer/mediaelement/issues/59/comments","events_url":"https://api.github.com/repos/johndyer/mediaelement/issues/59/events","html_url":"https://github.com/johndyer/mediaelement/issues/59","id":507994,"number":59,"title":"How to change multiple source elements at once?","user":{"login":"sqrt","id":303458,"avatar_url":"https://avatars.githubusercontent.com/u/303458?v=3","gravatar_id":"","url":"https://api.github.com/users/sqrt","html_url":"https://github.com/sqrt","followers_url":"https://api.github.com/users/sqrt/followers","following_url":"https://api.github.com/users/sqrt/following{/other_user}","gists_url":"https://api.github.com/users/sqrt/gists{/gist_id}","starred_url":"https://api.github.com/users/sqrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqrt/subscriptions","organizations_url":"https://api.github.com/users/sqrt/orgs","repos_url":"https://api.github.com/users/sqrt/repos","events_url":"https://api.github.com/users/sqrt/events{/privacy}","received_events_url":"https://api.github.com/users/sqrt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2011-01-05T13:49:52Z","updated_at":"2015-02-02T12:08:17Z","closed_at":"2011-01-06T10:31:25Z","body":"\t<video width=\"512\" height=\"288\" controls id=\"player\">\n\t\t<!-- MP4 must be first for iPad! -->\n\t\t<source src=\"videos/big-buck-bunny_trailer.mp4\" type=\"video/mp4\" id=\"mp4\" /><!-- WebKit video    -->\n\t\t<source src=\"videos/big-buck-bunny_trailer.webm\" type=\"video/webm\" id=\"webm\" /><!-- Firefox / Opera / Chromium -->\n\t</video>\n\t<div id=\"audience\">\n\t\t<a href=\"videos/big-buck-bunny_trailer.mp4\" class=\"thumb\"><img src=\"videos/big-buck-bunny_trailer.jpg\" width=\"200\" /></a>\n\t\t<a href=\"videos/elephants-dream_teaser.mp4\" class=\"thumb\"><img src=\"videos/elephants-dream_teaser.jpg\" width=\"200\" /></a>\n\t\t<a href=\"videos/sintel_trailer.mp4\" class=\"thumb\"><img src=\"videos/sintel_trailer.jpg\" width=\"200\" /></a>\n\t</div>\n\nHow can I change both of the <source> elements in the above snippet at once? I'd like to play the respective video file(s) when clicking the snapshots.\n\nSomething along the lines of:\n\t<script>\n\tnew MediaElement(\"player\", {success: function(player) {\n\t\t$(\"a.thumb\").click(function() {\n\t\t\t$(\"#player\").src = this.href; // changing both elements using the respective extension\n\t\t\tplayer.play();\n\t\t\treturn false;\n\t\t});\n\t}});\n\t</script>\n\nI would be happy if you were able to help me! :)\nThanks!\n\nP.S. I recognize this is not an issue for the bug tracker, but I wasn't able to find a forum or something. Sorry for the trouble. "},"comment":{"url":"https://api.github.com/repos/johndyer/mediaelement/issues/comments/72446984","html_url":"https://github.com/johndyer/mediaelement/issues/59#issuecomment-72446984","issue_url":"https://api.github.com/repos/johndyer/mediaelement/issues/59","id":72446984,"user":{"login":"gregfr","id":361582,"avatar_url":"https://avatars.githubusercontent.com/u/361582?v=3","gravatar_id":"","url":"https://api.github.com/users/gregfr","html_url":"https://github.com/gregfr","followers_url":"https://api.github.com/users/gregfr/followers","following_url":"https://api.github.com/users/gregfr/following{/other_user}","gists_url":"https://api.github.com/users/gregfr/gists{/gist_id}","starred_url":"https://api.github.com/users/gregfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregfr/subscriptions","organizations_url":"https://api.github.com/users/gregfr/orgs","repos_url":"https://api.github.com/users/gregfr/repos","events_url":"https://api.github.com/users/gregfr/events{/privacy}","received_events_url":"https://api.github.com/users/gregfr/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T12:08:17Z","updated_at":"2015-02-02T12:08:17Z","body":"For future reference:\r\nhttps://github.com/johndyer/mediaelement/wiki/setSrc()"}}