denoland / wanted_modules

Is there a missing deno module that is preventing you from building something? Let us know here.
https://deno.land/x
46 stars 2 forks source link

MPV (idea: python-mpv) #67

Open silvioprog opened 1 year ago

silvioprog commented 1 year ago

It would be nice a module like this in Deno: https://github.com/jaseg/python-mpv

Playing video in:

import mpv
player = mpv.MPV(ytdl=True)
player.play('https://youtu.be/DOmdB7D-pUU')
player.wait_for_playback()

and an audio (online radio):

import mpv
player = mpv.MPV()
player.play('http://s1.myradiostream.com:12508/listen.mp3')
player.wait_for_playback()
eliassjogreen commented 11 months ago

Well, considering the python module already exists you could do the following using my deno_python module:

Playing video in:

import { python } from "https://deno.land/x/python/mod.ts";

const mpv = python.import("mpv");
const player = new mpv.MPV(ytdl=True);
player.play('https://youtu.be/dQw4w9WgXcQ');
player.wait_for_playback();

and an audio (online radio):

import { python } from "https://deno.land/x/python/mod.ts";

const mpv = python.import("mpv");

player = mpv.MPV();
player.play('http://s1.myradiostream.com:12508/listen.mp3')
player.wait_for_playback();