Save the display and go back to the content. You can check by clicking on the gear on the far right and should see this. By default an HTML5 player should be selected. Under “formats”, change it from generic file to audio player.Using the dropdown for the content type, select “Manage display”.To display the audioplayer that comes with the audiofield module, you need to go back to: Now we have our content but still no audio player. # Image 2, Note the blue audio title indicating that it has uploaded successfully. # Image 1, Error 500 the file was too large. The second image is how it should look if it is added successfully. In fact, it create an error because the file size was marginally too big, thus exceeding the filesize limit. You will notice that the first image doesn’t work. Now that we have created our new content type with audio field, we need to add the content and make sure it works. While Drupal can set a maximum size, that does not override your server’s PHP setting that states how big the file can be. It’s important to note here that PHP will directly affect the file size limit you can use. This can be done in the allowed file extensions area.įor my site, I removed the “txt” entry and added “mp3”, because there is no need to allow text files to be uploaded to an audio attachment. We need to make sure that we define the file extensions we are going to use. On the field settings screen, you can specify the number of files you can attach.In the “Add a new field” section, select “ file“.Here we can add or modify an existing content type to add the Audio Field. In order to get started, you must download, install and enable the AudioField module. Using the Drupal AudioField module, I will explain how you can display a simple HTML5 player for your site’s audio files. This week, an OSTraining member asked us about adding audio files to their Drupal 8 site.
0 Comments
Leave a Reply. |