Adding Audio to a Model
It is a little-known fact that WordPress, by default, supports easy content embedding of MP3 Audio files. Because WP3D Models is built on top of WordPress, this simplifies adding Music and/or Audio to any WP3D Models content!
Not everyone loves autoplaying** audio when they land on a webpage. In fact, some people downright despise this sort of content addition. We’re going to show you how to add this, but use at your own risk! 😉
**Most mobile devices do not support autoplaying video/audio, largely for cellular bandwidth reasons.
Hopefully, this is somewhat obvious, but you must be using WP3D Models to use this tutorial.
Select some audio to use for your page. There are a number of different places to find “free” audio, like freemusicarchive.org, but you’ll need to be sure that you read up on the various usage licenses to make sure you’re able to legally publish this content. Alternatively, lots of great options exist on AudioJungle.com for as little as ~$20. Specifically, here are some “corporate” examples (affiliate link) that might be a good fit.
Armed with your legal-to-use MP3, begin editing the Model where you’d like to include this Audio/Music file. Inside WP3D’s “Primary Model Content”, paste, place your cursor at the very top, add an empty line/space and click the “Add Media” Button.
Inside the popup window, switch to the “Upload” Tab and drag/drop your MP3 File.
Once uploaded, click the “Insert Into Page” button, in the lower right corner of your screen. You should now see something like this:
Technically you could stop here, and allow your users to control whether or not the audio is playing when your page loads. Or, you can take this a step further to enable the autoplay. If you do want the audio to begin downloading/playing (on non-mobile devices), you’ll want to click on the “Text” tab to reveal the actual WordPress shortcode that has been created.
You should see something that looks similar to this:
Put on your “coding” hat, because you’ll need to make a manual adjustment in order to get the audio to play on its own.
Reference the example code above, you’ll want to modify your own shortcode, adding autoplay=”1″ to the code so that your code resembles the following:
[audio mp3="http://demo.wp3dmodels.com/wp-content/uploads/my.mp3" autoplay="1"][/audio]
Note that the “mp3” value will be different in your case.
That’s it! Save (“Update”) your Model and you should find that your audio begins to play as soon as your content is loaded.