Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:23:59+00:00 2026-06-10T03:23:59+00:00

I want to create a audio or video controller, but my current code only

  • 0

I want to create a audio or video controller, but my current code only plays the content, nothing is shown to control it in my browser

#import ('dart:html');
void main () {
  AudioElement audio = new AudioElement();
  audio.src="http://slides.html5rocks.com/src/rushus-modal_blues.mp3";
  audio.autoplay=true;
  window.document.body.nodes.add(audio);
}

So how do you get Dart to show a controller for audio/video ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:24:01+00:00Added an answer on June 10, 2026 at 3:24 am

    The controls for audio/video are disabled by default. You will need to enable them

    audio.controls = true;

    should do the trick.

    Alternativly you can also build the audio source and controls settings from scractch, the following examples shows this and have been tested sucessfully with dart2js

    var audioSource = new SourceElement();
    audioSource.src = "http://slides.html5rocks.com/src/rushus-modal_blues.mp3";
    audioSource.type = "audio/mp3";
    
    var audio = new AudioElement();
    audio.attributes["controls"] = "controls";
    audio.nodes.add(audioSource);
    window.document.body.nodes.add(audio);
    

    There is more info on controlling audio here and video here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an audio recorder I have tried the code I get
I want create a html5 audio in dynamic and play it,here is the code:
i want to create an epub reader with feature like play video and audio
I create an audio buffer and want to edit this before I play this
i want create Dynamic Slideshow in Jquery i'm Write this code var ctx =
I want create module which update list of usb devices automatically (not only mass
I'm trying to create a video from an image sequence and add audio with
I want to create a simple video player using mediaPlayer.. So I did the
I want to create 2 JMenuItem that can start and stop the background audio.
I want to create a web page that contains an (Flex/Flash) audio player that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.