Skip to content

[QUESTION] How I can get src from the audio/video tags ? #766

@aniketsongara

Description

@aniketsongara

I want the source(src) value from the below audio tag

<audio controls>
  <source src="http://dev.teeme.net/workplaces/aniket2/editor_uploads/01e6e0117e45dbfcb83887b3ca18583d4b23cd36.mp3" type="audio/mp3">
</audio>

I was trying to get it using customRender in Html package but not able to get it.
here is what I am trying

Html(
        data: '''<audio controls>
  <source src="http://dev.teeme.net/workplaces/aniket2/editor_uploads/01e6e0117e45dbfcb83887b3ca18583d4b23cd36.mp3" type="audio/mp3">
</audio>''',
        shrinkWrap: true,
        customRender: {
           "audio": (context, child) {
                 debugPrint("audio tag : ${context.tree.attributes['src']}");
                      return Text("Audio : ${context.tree.attributes['src']}");
                      }
      })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions