
Recherche avancée
Autres articles (32)
-
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (3909)
-
How to load cross domain videos into video tag for web gl processing ?
22 novembre 2013, par user3022391Current working on a project using FFMpeg and stream.m to transcode a live stream to web.m format for use in a HTML5 desktop player on chrome. All works well when sending the video to a standard video tag, however when it used in my canvas / webgl application it struggles to load the video reporting the following error repeatedly :
Uncaught SecurityError : Failed to execute 'texImage2D' on 'WebGLRenderingContext' : the video element contains cross-origin data, and may not be loaded.
Looking into CORS, it seems that because the website is loading on http (80) and I am streaming the converted video live from the stream.m server (which is on the same domain but uses port 8089 - this counts as cross-domain video sourcing. I've added allow policies to the .htaccess file and cross-domain.xml however still seeing the issue.
Does anyone know if you can add custom allow-access headers to ffmpeg output or know of an alternative workaround ?
-
how to run HTML5/JS code without client side ? [duplicate]
27 février 2015, par AbhinavThis question already has an answer here :
-
Rendering HTML5 animation server-side ?
4 answers
I need to create some animations using HTML5 canvas. And then need to convert it to video by capturing each frame.
My problem is to run the HTML5/JS code on server side without any client(browser). Is it possible ? Can I just run it without actually rendering on a browser and still produce all animations ?
TIA
-
Rendering HTML5 animation server-side ?
-
Command raised an exception : NameError : name 'player' is not defined
20 mars 2023, par baartysI finally got myself a hosting for my project, but got into an error and I don't know how to resolve it.
I ran command !play to start streaming in vc, but I got this error :


2023-03-19 18:36:04 INFO discord.client logging in using static token
2023-03-19 18:36:04 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: f983009c9f2881b87ee119278692efc9).
Eurobeat Radio is running!
2023-03-19 18:36:10 ERROR discord.ext.commands.bot Ignoring exception in command play
Traceback (most recent call last):
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 229, in wrapped
 ret = await coro(*args, **kwargs)
 File "/home/container/radio.py", line 44, in play
 player.play(FFmpegPCMAudio('http://stream.eurobeat.xyz'))
NameError: name 'player' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
 await ctx.command.invoke(ctx)
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1023, in invoke
 await injected(*ctx.args, **ctx.kwargs) # type: ignore
 File "/home/container/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 238, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'player' is not defined



I tried running it on my pc and that was without error, but once it was on the hosting it ran in to the error up the page.


Here is the code :


import discord
import urllib.request, json 
from discord import FFmpegPCMAudio
from discord.ext import commands
from discord.ext import tasks
client= commands.Bot(command_prefix="er!", intents=discord.Intents.all(), help_command=None)

@tasks.loop(seconds=10.0)
async def my_background_task():
 """Will loop every 60 seconds and change the bots presence"""
 with urllib.request.urlopen('https://api.laut.fm/station/eurobeat/current_song') as url:
 data = json.load(url)
 global namestatus
 global artiststatus
 namestatus = data['title']
 artiststatus = data['artist']['name']
 await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="Eurobeat FM"))
 await client.change_presence(activity=discord.Game(name="Para para dancing ~"))
 await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=f"{namestatus} by {artiststatus}"))


@client.event
async def on_ready():
 print('Eurobeat Radio is running!')
 await client.wait_until_ready()
 my_background_task.start()


@client.event
async def on_voice_state_update(member, prev, cur):
 if client.user in prev.channel.members and len([m for m in prev.channel.members if not m.bot]) == 0:
 channel = discord.utils.get(client.voice_clients, channel=prev.channel)
 await channel.disconnect()

@client.command(aliases=['p', 'pla', 'join', 'j'])
async def play(ctx, url: str = 'http://stream.eurobeat.xyz'): 
 channel = ctx.message.author.voice.channel
 global player
 try:
 player = await channel.connect()
 except:
 pass
 player.play(FFmpegPCMAudio('http://stream.eurobeat.xyz'))
 embedVar = discord.Embed(title="Started Playing!", color=discord.Color.random())
 await ctx.send(embed=embedVar)



Would be very grateful for your help !