• Resolved technolife2

    (@technolife2)


    Hi,

    I’d like to add a music to my website via Youtube.
    Your plugin seems to be the best solution, but I’d like to use it directly in my .php file.

    I tried to use : echo lyte_preparse(‘httpa://YoutubeLink’);
    but it doesn’t work, it loads the entire video, not just the audio.

    Is there a way to do it ?

    Thank !

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid support for audio-only is flaky ever since youtube made some changes @technolife2. if audio-only youtube is your sole goal, you might need a different solution.

    Thread Starter technolife2

    (@technolife2)

    Hi,
    when I add it directly in a wordpress page, it works (using [lyte id= ?_SQkWbRublY ? audio= ?true ? /]).

    So I think the plugin is ok, it’s just the way I use it ?
    Is there a function that I could use directly in my php like “echo post_video_from_youtube_lyte(url);” ?

    Thank.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I see … can you try

    echo lyte_preparse(‘youtubeID’);

    instead?

    Thread Starter technolife2

    (@technolife2)

    Okay, it works !
    I changed:
    function lyte_preparse($videoId) {
    return lyte_parse(‘httpv://www.youtube.com/watch?v=’.$videoId);
    }

    to:
    function lyte_preparse($videoId) {
    return lyte_parse(‘httpa://www.youtube.com/watch?v=’.$videoId);
    }
    in wp-youtube-lyte.php.

    Thank you for your help !

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    better still;

    echo lyte_parse('httpa://www.youtube.com/watch?v=AX0y5tkPHgM');

    ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding a audio only video directly in PHP’ is closed to new replies.