diff --git a/dist/arc_youtube.txt b/dist/arc_youtube.txt index 224ff6c..4edb37d 100755 --- a/dist/arc_youtube.txt +++ b/dist/arc_youtube.txt @@ -1,4 +1,4 @@ -# arc_youtube v2.0.3 +# arc_youtube v2.0.4 # Embed Youtube videos with customised player # Andy Carter # http://andy-carter.com/ @@ -10,7 +10,7 @@ # ...................................................................... YTo5OntzOjQ6Im5hbWUiO3M6MTE6ImFyY195b3V0dWJlIjtzOjc6InZlcnNpb24iO3M6NToi -Mi4wLjMiO3M6NjoiYXV0aG9yIjtzOjExOiJBbmR5IENhcnRlciI7czoxMDoiYXV0aG9yX3Vy +Mi4wLjQiO3M6NjoiYXV0aG9yIjtzOjExOiJBbmR5IENhcnRlciI7czoxMDoiYXV0aG9yX3Vy aSI7czoyMzoiaHR0cDovL2FuZHktY2FydGVyLmNvbS8iO3M6MTE6ImRlc2NyaXB0aW9uIjtz OjQzOiJFbWJlZCBZb3V0dWJlIHZpZGVvcyB3aXRoIGN1c3RvbWlzZWQgcGxheWVyIjtzOjQ6 InR5cGUiO2k6MDtzOjQ6ImhlbHAiO3M6OTY1MToiCTxoMT5hcmNfeW91dHViZTwvaDE+CgoJ @@ -38,8 +38,8 @@ Cgk8aDM+YXJjX3lvdXR1YmU8L2gzPgoKCTxwPkVtYmVkcyBhIFlvdXR1YmUgdmlkZW8gaW4g dGhlIHBhZ2UgdXNpbmcgYW4gaWZyYW1lLjwvcD4KCjxwcmU+PGNvZGU+Jmx0O3R4cDphcmNf eW91dHViZSAvJmd0Owo8L2NvZGU+PC9wcmU+CgoJPGg0PlZpZGVvIGFuZCBwbGF5bGlzdCBh dHRyaWJ1dGVzPC9oND4KCgk8dWw+CgkJPGxpPjxlbT52aWRlbzwvZW0+ICYjODIxMTsgWW91 -dHViZSB1cmw8c3VwIGNsYXNzPSJmb290bm90ZSI+PGEgaHJlZj0iI2ZuMTE1MDk5MTA1ODU2 -OTAwOTkzY2RjYzgiPjE8L2E+PC9zdXA+IG9yIHZpZGVv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NhcHMiPlNPRlRX -QVJFPC9zcGFuPi48L3A+IjtzOjQ6ImNvZGUiO3M6NTc0NjoiCmZ1bmN0aW9uIGFyY195b3V0 -dWJlKCRhdHRzLCAkdGhpbmcpCnsKCWdsb2JhbCAkdGhpc2FydGljbGU7CgogICAgZXh0cmFj -dChsQXR0cyhhcnJheSgKICAgICAgICAndmlkZW8nICAgICA9PiAnJywKICAgICAgICAncGxh -eWxpc3QnICA9PiAnJywKICAgICAgICAnY3VzdG9tJyAgICA9PiAnWW91dHViZSBJRCcsCiAg -ICAgICAgJ3dpZHRoJyAgICAgPT4gJzAnLAogICAgICAgICdoZWlnaHQnICAgID0+ICcwJywK -ICAgICAgICAncmF0aW8nICAgICA9PiAnNDozJywKICAgICAgICAnY29sb3InICAgICA9PiAn -cmVkJywgLy8gb3IgJ3doaXRlJwogICAgICAgICdmcycgICAgICAgID0+ICcxJywKICAgICAg -ICAnY2MnICAgICAgICA9PiAwLAogICAgICAgICdyZWxhdGVkJyAgID0+IDEsCiAgICAgICAg -J3N0YXJ0JyAgICAgPT4gMCwKICAgICAgICAndGhlbWUnICAgICA9PiAnZGFyaycsCiAgICAg -ICAgJ3ByaXZhY3knICAgPT4gJzAnLAogICAgICAgICdhdXRvJyAgICAgID0+ICcwJywKICAg -ICAgICAnYXV0b2hpZGUnICA9PiBudWxsLAogICAgICAgICdjb250cm9scycgID0+IG51bGws -CiAgICAgICAgJ2Fubm90YXRpb25zJyA9PiBudWxsLCAvLyAxIG9yIDMKICAgICAgICAnbG9v -cCcgICAgICA9PiAwLAogICAgICAgICdtb2Rlc3RicmFuZGluZycgPT4gbnVsbCwKICAgICAg -ICAncGxheXNpbmxpbmUnID0+IG51bGwsIC8vIDAgb3IgMQogICAgICAgICd0aXRsZScgICAg -ID0+IG51bGwsCiAgICAgICAgJ2xpbmsnICAgICAgPT4gJzAnLAogICAgICAgICdsYWJlbCcg -ICAgID0+ICcnLAogICAgICAgICdsYWJlbHRhZycgID0+ICcnLAogICAgICA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YXJyYXkoJ3YnID0+ICRtYXRjaGVzWzFdKTsKCiAgICB9CgogICAgcmV0dXJuIGZhbHNl -Owp9CiI7czozOiJtZDUiO3M6MzI6IjNmMjVkZjE1NzA0MmEyMDZiMDA5NDgxY2Y0ZjY2ZWVi -Ijt9 +QVJFPC9zcGFuPi48L3A+IjtzOjQ6ImNvZGUiO3M6NTc3ODoiCmZ1bmN0aW9uIGFyY195b3V0 +dWJlKCRhdHRzLCAkdGhpbmcpCnsKICAgIGdsb2JhbCAkdGhpc2FydGljbGU7CgogICAgZXh0 +cmFjdChsQXR0cyhhcnJheSgKICAgICAgICAndmlkZW8nICAgICA9PiAnJywKICAgICAgICAn +cGxheWxpc3QnICA9PiAnJywKICAgICAgICAnY3VzdG9tJyAgICA9PiAnWW91dHViZSBJRCcs +CiAgICAgICAgJ3dpZHRoJyAgICAgPT4gJzAnLAogICAgICAgICdoZWlnaHQnICAgID0+ICcw +JywKICAgICAgICAncmF0aW8nICAgICA9PiAnNDozJywKICAgICAgICAnY29sb3InICAgICA9 +PiAncmVkJywgLy8gb3IgJ3doaXRlJwogICAgICAgICdmcycgICAgICAgID0+ICcxJywKICAg +ICAgICAnY2MnICAgICAgICA9PiAwLAogICAgICAgICdyZWxhdGVkJyAgID0+IDEsCiAgICAg +ICAgJ3N0YXJ0JyAgICAgPT4gMCwKICAgICAgICAndGhlbWUnICAgICA9PiAnZGFyaycsCiAg +ICAgICAgJ3ByaXZhY3knICAgPT4gJzAnLAogICAgICAgICdhdXRvJyAgICAgID0+ICcwJywK +ICAgICAgICAnYXV0b2hpZGUnICA9PiBudWxsLAogICAgICAgICdjb250cm9scycgID0+IG51 +bGwsCiAgICAgICAgJ2Fubm90YXRpb25zJyA9PiBudWxsLCAvLyAxIG9yIDMKICAgICAgICAn +bG9vcCcgICAgICA9PiAwLAogICAgICAgICdtb2Rlc3RicmFuZGluZycgPT4gbnVsbCwKICAg +ICAgICAncGxheXNpbmxpbmUnID0+IG51bGwsIC8vIDAgb3IgMQogICAgICAgICd0aXRsZScg +ICAgID0+IG51bGwsCiAgICAgICAgJ2xpbmsnICAgICAgPT4gJzAnLAogICAgICAgICdsYWJl +bCcgICAgID0+ICcnLAogICAgICAgICdsYWJlbHRhZycgID0+ICcnLAogICAgICAgICd3cmFw +dGFnJyAgID0+ICcnLAogICAgICAgICdjbGFzcycgICAgID0+IF9fRlVOQ1RJT05fXwogICAg +KSwgJGF0dHMpKTsKCiAgICAkY3VzdG9tID0gc3RydG9sb3dlcigkY3VzdG9tKTsKICAgIGlm +ICghJHZpZGVvICYmIGlzc2V0KCR0aGlzYXJ0aWNsZVskY3VzdG9tXSkpIHsKICAgICAgICAk +dmlkZW8gPSAkdGhpc2FydGljbGVbJGN1c3RvbV07CiAgICB9CgogICAgJHYgPSBudWxsOwog +ICAgJHAgPSBudWxsOwoKICAgIC8vIENoZWNrIGZvciBZb3V0dWJlIHZpZGVvIElEIG9yIFlv +dXR1YmUgVVJMIHRvIGV4dHJhY3QgSUQgZnJvbQogICAgJG1hdGNoID0gX2FyY195b3V0dWJl +KCR2aWRlbyk7CiAgICBpZiAoIWVtcHR5KCRtYXRjaFsndiddKSkgewogICAgICAgICR2ID0g +JG1hdGNoWyd2J107CiAgICB9IGVsc2VpZiAoIWVtcHR5KCRtYXRjaFsncCddKSkgewogICAg +ICAgICRwID0gJG1hdGNoWydwJ107CiAgICB9IGVsc2VpZiAoIWVtcHR5KCR2aWRlbykpIHsK +ICAgICAgICAkdiA9ICR2aWRlbzsKICAgIH0gZWxzZWlmICghZW1wdHkoJHBsYXlsaXN0KSkg +ewogICAgICAgICRwID0gJHBsYXlsaXN0OwogICAgfSBlbHNlIHsKICAgICAgICByZXR1cm4g +Jyc7CiAgICB9CgogICAgJHNyYyA9ICcvL3d3dy55b3V0dWJlJyAuICgkcHJpdmFjeSA/ICct +bm9jb29raWUnIDogJycpIC4gJy5jb20vZW1iZWQvJzsKCiAgICAkc3JjIC49ICFlbXB0eSgk +dikgPyAkdiA6IG51bGw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VsLCAkbGFiZWx0YWcpLigoJHdyYXB0YWcpID8gZG9UYWcoJG91dCwgJHdyYXB0 +YWcsICRjbGFzcykgOiAkb3V0KTsKfQoKZnVuY3Rpb24gYXJjX2lmX3lvdXR1YmUoJGF0dHMs +ICR0aGluZykKewogICAgZ2xvYmFsICR0aGlzYXJ0aWNsZTsKCiAgICBleHRyYWN0KGxBdHRz +KGFycmF5KAogICAgICAgICdjdXN0b20nID0+IG51bGwsCiAgICAgICAgJ3ZpZGVvJyA9PiBu +dWxsCiAgICApLCAkYXR0cykpOwoKICAgICRyZXN1bHQgPSAkdmlkZW8gPyBfYXJjX3lvdXR1 +YmUoJHZpZGVvKSA6IF9hcmNfeW91dHViZSgkdGhpc2FydGljbGVbc3RydG9sb3dlcigkY3Vz +dG9tKV0pOwoKICAgIHJldHVybiBwYXJzZShFdmFsRWxzZSgkdGhpbmcsICRyZXN1bHQpKTsK +fQoKZnVuY3Rpb24gX2FyY195b3V0dWJlKCR2aWRlbykKewogICAgaWYgKHByZWdfbWF0Y2go +Ii9eW2EtekEtWl0rWzpcL1wvXStbQS1aYS16MC05XC1fXStcXC55b3V0dWJlXFwuK1tBLVph +LXowLTlcLlwvJSY9XD9cLV9dKyQvaSIsICR2aWRlbykpIHsKICAgICAgICAkdXJsYyA9IHBh +cnNlX3VybCgkdmlkZW8pOwogICAgICAgICRxc3RyID0gJHVybGNbJ3F1ZXJ5J107CiAgICAg +ICAgcGFyc2Vfc3RyKCRxc3RyLCAkcWFycik7CgogICAgICAgIGlmIChpc3NldCgkcWFyclsn +diddKSkgewogICAgICAgICAgICByZXR1cm4gYXJyYXkoJ3YnID0+ICRxYXJyWyd2J10pOwoK +ICAgICAgICB9IGVsc2VpZiAoaXNzZXQoJHFhcnJbJ3AnXSkpIHsKICAgICAgICAgICAgcmV0 +dXJuIGFycmF5KCdwJyA9PiAkcWFyclsncCddKTsKCiAgICAgICAgfSBlbHNlIHsKICAgICAg +ICAgICAgcmV0dXJuIGZhbHNlOwoKICAgICAgICB9CgogICAgfSBlbHNlaWYgKHByZWdfbWF0 +Y2goIi9eW2EtekEtWl0rWzpcL1wvXSt5b3V0dVwuYmVcLyhbQS1aYS16MC05XSspL2kiLCAk +dmlkZW8sICRtYXRjaGVzKSkgewogICAgICAgIHJldHVybiBhcnJheSgndicgPT4gJG1hdGNo +ZXNbMV0pOwoKICAgIH0KCiAgICByZXR1cm4gZmFsc2U7Cn0KIjtzOjM6Im1kNSI7czozMjoi +MGI4NjU3MzU2ODUxMjM0Zjc3NGNmNGJkYjBhNjM0MzciO30= diff --git a/src/arc_youtube.php b/src/arc_youtube.php index 926aabd..a249034 100755 --- a/src/arc_youtube.php +++ b/src/arc_youtube.php @@ -2,7 +2,7 @@ $plugin['name'] = 'arc_youtube'; -$plugin['version'] = '2.0.3'; +$plugin['version'] = '2.0.4'; $plugin['author'] = 'Andy Carter'; $plugin['author_uri'] = 'http://andy-carter.com/'; $plugin['description'] = 'Embed Youtube videos with customised player';