PyZombis aayush/issue#218@321ced6
Social
Runestone in social media:
Follow @iRunestone
Our Facebook Page
Help support us:
Search
Table of Contents
Book Index
User
Assignments
Practice
Change Course
Instructor's Page
Progress Page
Edit Profile
Change Password
Register
Login
Dark Mode
Scratch Activecode
Help
FAQ
Instructors Guide
About Runestone
Report A Problem
1.
DJ Mix
¶
from browser import document, html audio_url = 'https://bigsoundbank.com/UPLOAD/mp3/0751.mp3' def start(): document['track'].play() print("Audio started") def stop(): document['track'].pause() document['track'].currentTime = 0 print("Audio stopped") audio_element = html.AUDIO(id='track', src=audio_url) document <= audio_element start_button = html.BUTTON('Start') start_button.bind('click', lambda ev: start()) stop_button = html.BUTTON('Stop') stop_button.bind('click', lambda ev: stop()) document <= start_button document <= stop_button
You have attempted
of
activities on this page