-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not autoplay audio dweets #394
Comments
That's easy to implement in js. Just get the comments using the api, check if "#audio" is there and delete the iframe autoplay attribute. |
Using Regex matching on the dweet would also get us pretty far, it will catch most normal audio dweets, but if somebody wants to they could always evade it. We could override the |
I suggest |
The more I think about it I don't want this to be tied to a normal hashtag. If it is manually tagged I think it should only be the author + moderators that can tag such dweets (with a report button for the rest). If not you might get people who aggressively add Also, @kipkat, slow dweets already time out :) |
we can create a new concept, ##onlyCreatorHastag that prevents griefers from spamming #pause if you |
If we want to do everything through hashtags:
There are actually multiple reasons we might not want to autostart a dweet:
|
Another trick is to use c.onmousemove=e=>{X=e.x};X; to make the dweet play only when mouseover. |
Anyway I don't mind if this is a checkbox for authors and a report button for users, instead of hashtags. But that would require touching python and adding some new things to the DB! 😱 How should we arrange the DB fields? Here are some possible alternatives:
Should user reports be kept in a separate table? I guess so. report: {
reporter: 'u/katkop',
date: 13431413,
dweetId: 123,
concerns: ['audio', 'flashy', 'heavy', 'made_by_xen'],
status: 'accepted', // or 'pending' or 'rejected'
} If we do require a reason not to autoplay, then we might also want a generic reason, for any cases we haven't considered. |
This would be good, because I'd like to see more audio dweets. I started to address this issue from within Dwitter by creating a small audio libary called DOMP. |
Domp handles starting and stopping audio when clicked on as well as some other handy stuff. Would it be possible to have Dwitter create an default audio context the same way it creates a canvas context? It's basically the same thing as the canvas but for audio. This could give dwitter more control while also allowing more space for audio code. |
We can detect an audio dweet if:
Audio
orSpeechSynthesis
or ...But just the hashtag would get us 99% of the way
Behaviour: An audio dweet should just start off paused. There will be a 'Play' button the user can click if they want to start the dweet running.
Optional extra:
One way to achieve this might be to override the
Audio
and SpeechSynthesis` constructors with our own functions that call the original functions, but also keep a copy of the constructed object in a global array, so that we can stop them when the button is pressed.This might also be an advantage when someone is editing an audio dweet. When they change the dweet, our reset function can stop all the existing audio output, to provide a clean slate for the new version.
The text was updated successfully, but these errors were encountered: