Support » Plugin: AudioIgniter Music Player » Edit plugin to load Caption by default

  • Please help – the Audio Igniter plugin also has a “lyrics” field so you can add the lyrics and it comes up on the front end with the song. Because I’m adding the same audio files to several different playlists, I don’t want to add the lyrics each time. So I wanted to add the lyrics text to the “Captions” field in the WP media library, and then make Audio Igniter map that field to the “lyrics” field just the way that it maps the Title and Artist.

    How can I do this?

    In the plugin files, the /assets/js/audioigniter.js files has the below code that looks as if it’s responsible for loading the track metadata. I’ve tried editing it to include the Captions field but I’m not proficient in jQuery and I broke the plugin.

    /**
    * Populates a track field
    *
    * @param {Object} $field – The field’s jQuery object
    * @param {Object} media – WP Media Manager media object
    */
    function populateTrackField($field, media) {
    var $urlInput = $field.find(el.trackUrlClassName);
    var $titleInput = $field.find(el.trackTitleClassName);
    var $artistInput = $field.find(el.trackArtistClassName);
    var $fieldTitle = $field.find(el.fieldTitleClassName);

    if (media.url) {
    $urlInput.val(media.url);
    }

    if (media.title && $titleInput.val() === “”) {
    $titleInput.val(media.title);
    $fieldTitle.text(media.title);
    }

    if (media.meta && media.meta.artist && $artistInput.val() === “”) {
    $artistInput.val(media.meta.artist);
    }
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Fotis

    (@markwaregr)

    Hi @5diraptor
    I am afraid this is quite complex and cannot be supported I am sorry. This is a quite nice thought for future updates.

    Thread Starter 5Diraptor

    (@5diraptor)

    @markwaregr Hello and thanks for your quick reply. It would be really useful to me and I like your plugin. Is this a job you could quote for me and if I can afford it I could pay for you to develop this feature for me?

    Kind regards, 5Diraptor

    Plugin Support Fotis

    (@markwaregr)

    Hi there
    @5diraptor
    Thank you for your feedback. Currently I have no availability but you can check http://jobs.wordpress.net/ for custom work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Edit plugin to load Caption by default’ is closed to new replies.