{"action":"created","issue":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor/issues/1877","repository_url":"https://api.github.com/repos/asciidoctor/asciidoctor","labels_url":"https://api.github.com/repos/asciidoctor/asciidoctor/issues/1877/labels{/name}","comments_url":"https://api.github.com/repos/asciidoctor/asciidoctor/issues/1877/comments","events_url":"https://api.github.com/repos/asciidoctor/asciidoctor/issues/1877/events","html_url":"https://github.com/asciidoctor/asciidoctor/issues/1877","id":178045722,"number":1877,"title":"audio and video blocks are using imagesdir, but should have a dedicated attribute","user":{"login":"edusantana","id":3603111,"avatar_url":"https://avatars.githubusercontent.com/u/3603111?v=3","gravatar_id":"","url":"https://api.github.com/users/edusantana","html_url":"https://github.com/edusantana","followers_url":"https://api.github.com/users/edusantana/followers","following_url":"https://api.github.com/users/edusantana/following{/other_user}","gists_url":"https://api.github.com/users/edusantana/gists{/gist_id}","starred_url":"https://api.github.com/users/edusantana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edusantana/subscriptions","organizations_url":"https://api.github.com/users/edusantana/orgs","repos_url":"https://api.github.com/users/edusantana/repos","events_url":"https://api.github.com/users/edusantana/events{/privacy}","received_events_url":"https://api.github.com/users/edusantana/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/asciidoctor/asciidoctor/labels/enhancement","name":"enhancement","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor/milestones/9","html_url":"https://github.com/asciidoctor/asciidoctor/milestones/v1.6.0","labels_url":"https://api.github.com/repos/asciidoctor/asciidoctor/milestones/9/labels","id":349596,"number":9,"title":"v1.6.0","description":"","creator":{"login":"mojavelinux","id":79351,"avatar_url":"https://avatars.githubusercontent.com/u/79351?v=3","gravatar_id":"","url":"https://api.github.com/users/mojavelinux","html_url":"https://github.com/mojavelinux","followers_url":"https://api.github.com/users/mojavelinux/followers","following_url":"https://api.github.com/users/mojavelinux/following{/other_user}","gists_url":"https://api.github.com/users/mojavelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/mojavelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojavelinux/subscriptions","organizations_url":"https://api.github.com/users/mojavelinux/orgs","repos_url":"https://api.github.com/users/mojavelinux/repos","events_url":"https://api.github.com/users/mojavelinux/events{/privacy}","received_events_url":"https://api.github.com/users/mojavelinux/received_events","type":"User","site_admin":false},"open_issues":89,"closed_issues":0,"state":"open","created_at":"2013-06-06T09:06:40Z","updated_at":"2016-09-24T23:30:41Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2016-09-20T12:28:00Z","updated_at":"2016-09-25T13:43:53Z","closed_at":null,"body":"Asciidoc code:\r\n\r\n```asciidoc\r\n= Testing audio and video\r\n\r\naudio::off-line/3/socializacao.mp3[]\r\nvideo::off-line/3/video.mp4[]\r\n\r\n:imagesdir: media/3\r\n\r\naudio::off-line/3/socializacao.mp3[]\r\nvideo::off-line/3/video.mp4[]\r\n\r\n```\r\n\r\nThe generated code:\r\n\r\n    <audio src=\"off-line/3/socializacao.mp3\" controls>\r\n    <video src=\"off-line/3/video.mp4\" controls>\r\n\r\n    <audio src=\"media/3/off-line/3/socializacao.mp3\" controls>\r\n    <video src=\"media/3/off-line/3/video.mp4\" controls>\r\n\r\nI have found [this lines of code](https://github.com/asciidoctor/asciidoctor/blob/5005fae5989cd9a4e4789e041053e2c7dc31975b/lib/asciidoctor/converter/html5.rb#L379-L392) that is how audio is converted to html5.\r\n\r\nI think it's missing the [asset_dir_key](https://github.com/asciidoctor/asciidoctor/blob/36f96bcf3290ee3573f766f5752858ba1322ddc7/lib/asciidoctor/abstract_node.rb):\r\n\r\n     def media_uri(target, asset_dir_key = 'imagesdir')\r\n"},"comment":{"url":"https://api.github.com/repos/asciidoctor/asciidoctor/issues/comments/249422570","html_url":"https://github.com/asciidoctor/asciidoctor/issues/1877#issuecomment-249422570","issue_url":"https://api.github.com/repos/asciidoctor/asciidoctor/issues/1877","id":249422570,"user":{"login":"edusantana","id":3603111,"avatar_url":"https://avatars.githubusercontent.com/u/3603111?v=3","gravatar_id":"","url":"https://api.github.com/users/edusantana","html_url":"https://github.com/edusantana","followers_url":"https://api.github.com/users/edusantana/followers","following_url":"https://api.github.com/users/edusantana/following{/other_user}","gists_url":"https://api.github.com/users/edusantana/gists{/gist_id}","starred_url":"https://api.github.com/users/edusantana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edusantana/subscriptions","organizations_url":"https://api.github.com/users/edusantana/orgs","repos_url":"https://api.github.com/users/edusantana/repos","events_url":"https://api.github.com/users/edusantana/events{/privacy}","received_events_url":"https://api.github.com/users/edusantana/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T13:43:53Z","updated_at":"2016-09-25T13:43:53Z","body":"This search for attributes is better... The main problem is to have `imagesdir` as a source dir for videos and audios. If you like an `assets-dir` to be added to the search, I don't have a problem. \r\n\r\nSince we are talking about paths... what do you think about having some kind of prefix-dir?\r\n\r\nVery often when we split a document with chapters or have a lot of documents in the same directory, I end up setting imagesdir, sourcedir and other things related to chapter or the document, here's a example tree:\r\n\r\n```\r\ndocumentA.adoc\r\ndocumentB.adoc\r\nimages/A/fig1.png\r\nimages/B/fig1.png\r\nsource/A/example.rb\r\nsource/B/example.rb\r\nvideos/A/intro.mp4\r\nvideos/B/intro.mp4\r\n```\r\n\r\nor with chapters:\r\n\r\n```\r\nbook.adoc\r\nchapter1.adoc\r\nchapter2.adoc\r\nimages/1/fig1.png\r\nimages/2/fig1.png\r\nsource/1/example.rb\r\nsource/2/example.rb\r\nvideos/1/intro.mp4\r\nvideos/2/intro.mp4\r\n```\r\n\r\nHere's a real example of the project I'm working now, every document starts with something like:\r\n\r\n```\r\n:componente: 2\r\n:offdir: off-line/{componente}\r\n:imagesdir: media/{componente}\r\n``` \r\n\r\nSo, with `dir-prefix`, `path-id` or `subdir` we could include an external file with imagesdir, videosdir, etc, and on each document or chapter we would set only the `subdir`... and it would automatically search for a subdirectory in theses directories. Do you like this idea? "}}
{"actor":{"display_login":"edusantana"}}