fix(wasm): request permission for media autoplay if needed
This commit is contained in:
parent
32c67d46d5
commit
53bf4b1aef
14 changed files with 44 additions and 467 deletions
16
src/menu.rs
16
src/menu.rs
|
|
@ -20,22 +20,6 @@ impl Plugin for MenuPlugin {
|
|||
|
||||
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
let font = asset_server.get_handle("UacariLegacy-Thin.ttf");
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
commands
|
||||
.spawn_bundle(Text2dBundle {
|
||||
text: Text::from_section(
|
||||
"Note:\nAudio is NOT available in the WASM build.",
|
||||
TextStyle {
|
||||
font: font.clone(),
|
||||
font_size: 24.0,
|
||||
color: Color::rgba(1., 0.4, 0.4, 1.),
|
||||
},
|
||||
)
|
||||
.with_alignment(TextAlignment::CENTER),
|
||||
transform: Transform::from_xyz(0., -128.0, 0.),
|
||||
..Default::default()
|
||||
})
|
||||
.insert(Menu);
|
||||
commands
|
||||
.spawn_bundle(Text2dBundle {
|
||||
text: Text::from_section(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue