إضافة تحميل الفيديو مع YouTube و Vimeo

ملاحظة: يتوفر هذا الإضافة كعنصر سمة مما يتيح تثبيتًا أسهل بكثير. الإضافة في هذا المنشور غير مدعومة بنشاط، يُوصى باستخدام عنصر السمة: Video Upload to YouTube and Vimeo using Theme Component

ملخص: يسمح للمستخدمين في منتدى Discourse برفع مقاطع الفيديو إلى Vimeo و YouTube مباشرةً من محرر Discourse.

:link: GitHub: GitHub - xomads/discourse-video-upload · GitHub
:arrow_right: التثبيت: اتبع دليل تثبيت الإضافة.

الميزات

يمكن لجميع أعضاء المنتدى رفع مقاطع الفيديو إلى Vimeo أو YouTube (يمكن للمسؤولين اختيار تمكين أي منهما أو كليهما).

يمكن للمسؤولين التحكم في خصوصية العرض والتضمين للمقاطع المرفوعة إلى Vimeo باستخدام إعدادات المسؤول.

يمكن للمستخدم التحكم في خصوصية العرض للمقاطع المرفوعة إلى YouTube من نافذة الرفع.

يمكنك مشاهدة عرض توضيحي للإضافة هنا:

الإعداد

يُدرج أدناه إعداد المطور لتمكين الرفع إلى YouTube و Vimeo. إذا كنت تفضل أن يقوم شخص آخر بذلك نيابةً عنك، يمكنك طلب الدعم من خلال التواصل معي، @ti0.

لرفع مقاطع YouTube

تُرفَع مقاطع YouTube إلى حساب المُرسل، على عكس مقاطع Vimeo التي تُرفَع إلى حساب مشترك.

عرض الخطوات
  • أنشئ حسابًا ومشروعًا على https://console.developers.google.com

  • فعّل YouTube Data API v3

  • اضبط شاشة الموافقة على OAuth للمستخدمين الخارجيين (ما لم يكن جميع أعضاء منتدى Discourse الخاص بك تابعين لمنظمة Google واحدة).

  • اضبط بيانات الاعتماد الخاصة بك:

    • أنشئ معرف عميل OAuth
    • اختر نوع تطبيق الويب
    • أضف رابط مثيل Discourse الخاص بك في قسم أصول JavaScript المصرح بها
  • انسخ معرف العميل المُنشأ فقط

  • انتقل إلى صفحة إعدادات الإضافة في لوحة تحكم Discourse، والصق معرف العميل في حقل youtube api client id.

  • فعّل رفع مقاطع YouTube من خلال تفعيل الإعداد التالي: youtube upload enabled

  • عدّل خيارات خصوصية العرض الافتراضية لـ YouTube إذا لزم الأمر.

  • يجب أن تكون قادرًا الآن على رفع مقاطع الفيديو مباشرةً من محرر مواضيع Discourse إلى YouTube.

لرفع مقاطع Vimeo

بمجرد إعداد الإضافة بالخطوات أدناه، سيتمكن جميع مستخدمي المجتمع من رفع مقاطع الفيديو إلى حساب Vimeo الخاص بك.
أنت مسؤول عن الحدود والاستخدام لحساب Vimeo الخاص بك.

عرض الخطوات
  • أنشئ حسابًا وتطبيقًا على Vimeo Developers:
    https://developer.vimeo.com/apps/new

  • اطلب الوصول للرفع في صفحة التطبيق

  • أنشئ رمز وصول مع أذونات الرفع

  • انتقل إلى صفحة إعدادات الإضافة في لوحة تحكم Discourse، وأضف رمز الوصول المُنشأ في إعداد vimeo api access token، ثم احفظ

  • فعّل رفع مقاطع Vimeo من خلال تفعيل إعداد vimeo upload enabled.

  • عدّل خيارات خصوصية العرض والتضمين

    • راجع صفحة Vimeo هذه للحصول على خيارات الخصوصية: privacy.view و privacy.embed
  • يجب أن تكون قادرًا الآن على رفع مقاطع الفيديو مباشرةً من محرر مواضيع Discourse إلى Vimeo

نشر مقطع فيديو

  • لنشر مقطع فيديو، أنشئ موضوعًا جديدًا أو ردًا على موضوع موجود.

  • انقر على زر Upload to Video الجديد في شريط أدوات المحرر (أيقونة الفيديو). يظهر هذا الزر فقط إذا قمت بتمكين YouTube أو Vimeo (أو كليهما) في إعدادات الإضافة.

  • اختر ملف فيديو وعدّل التفاصيل مثل العنوان والوصف إذا رغبت في ذلك.

  • انقر على زر رفع إلى Vimeo أو رفع إلى YouTube.

    • تعتمد الأزرار المعروضة على ما إذا كنت قد فعّلت رفع مقاطع YouTube / Vimeo (أي منهما أو كليهما).

    • سيُظهر لك تقدم الرفع، ثم سينتظر حتى يكتمل عملية الترميز (transcoding) للمقطع.

    • ستبقى النافذة المنبثقة مفتوحة حتى يكتمل الترميز.

    • بمجرد اكتمال الترميز، سيتم إضافة رابط الفيديو إلى المحرر (ما لم يكن هناك خطأ في الترميز).

  • احفظ المنشور، ويمكن لجميع مستخدمي المجتمع الآخرين مشاهدة الفيديو الخاص بك
    (اعتمادًا على خيارات الخصوصية التي اخترتها).

[/deta

طلبات الميزات

يمكنك طلب ميزات إضافية أو دعم من خلال التواصل معي @ti0.

المساهمات

إذا وجدت الإضافة مفيدة، يرجى النظر في التبرع لمطور الإضافة باستخدام رابط PayPal هذا: PayPal.Me

المساهمات الكبيرة والصغيرة مرحب بها بالتساوي :slight_smile:

إذا كنت ترغب في تعزيز الإضافة، فإن طلبات السحب (PRs) مرحب بها.

34 إعجابًا

Awesome plugin, people have asked for something similar for years now!

One suggestion I have is hiding the “Uploading to Video” button on the modal unless the file returned from the File Picker has one of the supported video extensions.

11 إعجابًا

You could go one step further here - hide the button, and make the whole thing completely transparent to the user. If they upload a video, it goes to vimeo. If they upload something else, it works as normal.

We have an API specifically for that - here’s an example use:

(plus, this API makes it work seamlessly with drag&drop uploads as well)

13 إعجابًا

I don’t know about this - I would like to know where my videos are being uploaded. There are many issues nowadays concerning privacy and related matters, and I feel it’s good to know where stuff goes, especially if it’s off-platform

I do like this possibility, I may implement this in the next update.

any idea where ? I can perhaps post an update on those topics to let them know of the existence of this new plugin.

since Discourse has not had this feature before, I felt it would be good if people could see that now there is a possibility to upload videos by keeping the button explicit (for those who have the plugin).

perhaps in later updates I can make these changes.

7 إعجابات
8 إعجابات

You could use a second modal on the client that discloses the Vimeo upload and asks for any extra information (title?) they want to provide. (For drag and drop, this would be the first seen modal.)

5 إعجابات

Important update
I updated the plugin so it is now the Discourse Video Upload plugin (earlier it was Discourse Vimeo Upload plugin). Now the plugin supports uploads directly to YouTube and Vimeo. Please check the updated guide in the first post for setup instructions.

8 إعجابات

Is there absolutely no way to upload them on a common account like it’s done with Vimeo?

إعجابَين (2)

I tried desperately to make this happen, there is no reasonable way to do this.

Also YouTube’s api limits are much worse than Vimeo, so you can only do 6 videos a day per account, and no good way to increase that (you have to request a limit increase, and if you tell them many people share one account they will stop it).

On the other hand, Vimeo let’s you just pay $7 or more a month and you have practically no limits.

Any reason you prefer Youtube?

5 إعجابات

Hello,

Thank you for creating this awesome plugin :heart: :slight_smile:

Is that possible to make a limitation for max upload video size?

I just installed it and there are warning messages in chrome dev.

Thank you :slight_smile:

إعجاب واحد (1)

Thanks for the feedback @Don :slight_smile:

Regarding the warnings, I don’t think they are coming from this plugin, are you sure it’s related? I’m not using whitelist anywhere.

And about the feature request, certainly it’s possible. I was hoping people would contribute to enhance the plugin, preferably through donations / paying for support or feature upgrades, small or big.
Any thoughts on that? Pm if you prefer

3 إعجابات

Thanks for your response! :slight_smile:

I use whitelist in settings. Is that related with that warning?
settings-video

If i disable the plugin these warnings not appears so it may be cause by this plugin.

Thank you :slight_smile:

إعجاب واحد (1)

It isn’t quite the same. Vimeo business model is paid subscriptions. So, as long as you pay, you can upload more. If it becomes a problem, just pay more, and you will pretty much always be good to go. If I’m not mistaken, there won’t be any easy way to monetize the video content, except by adding ads in the video yourself (we could always imagine your plugin doing this one day, but you would still need to find the advertisers, make them pay, etc. And it wouldn’t be easy to change ads and so on. Not very good in any case).

On the other end, Youtube would allow a forum to monetize easily the uploaded video content. If that was uploaded to an account belonging to the forum. A quick search say that limits are pretty high (100 per day, with a limit getting put in place at 50 per day if you hit 100 one day), BUT seem far more limited when you use the API, as you’re saying (I also saw the number of 6 per day).

It would be a great option to be able to choose how to upload to Youtube: Common account or individual accounts. The big question is if forum owners would be able to get this limit increased with youtube. I don’t think you should tell them several people use the account, but that the account belong to an entity (the forum), and it’s the entity which uploads. A question of how you spin it. You would maybe need (and that would be your best interest in any case if it’s with your account) to check the videos before upload: An option to store the videos locally for approval before upload to youtube ? And an option to limit the number of uploads per day (to be able to start with a limit of 6) ?

That’s a few suggestions. Do what you want with them (they rely on the fact that it would be possible to get the limit increased. I’m not sure at all how possible that is. But it sure would be great).

3 إعجابات

when I try that I still don’t get the warning you are seeing. Sorry, cannot help with this because I am not seeing the warnings - perhaps it is specific to your instance ? I am using beta5 (the most recent release), and not seeing those warnings.

3 إعجابات

I had not thought of this angle.

I’m sure it’s possible to get the limit increased, it is certainly in YTs best interest to do this especially if monetization is involved.

Your suggestions are great, and quite possible to implement with enough effort. These are pretty significant changes to the plugin and require quite a lot of work, so I would only be interested in doing them if someone (or a group) is willing to pay for feature development.

4 إعجابات

What about copyright issues? You’re basically giving free access to your own YouTube/Vimeo channel and allow people to upload anything they like into it - that sounds like a DMCA disaster waiting to happen, which might have personal repercussions for you.

5 إعجابات

certainly an issue, that’s why I think the Vimeo option should only be used by communities where the members can be trusted to be responsible. and that’s why there is a strong message indicating users are responsible for their vimeo account.

4 إعجابات

Alright no problem. :slightly_smiling_face: I use the latest Discourse. I will check the other plugins etc maybe this is a conflict issue or something like that. Are you familiar with these warnings? It will cause any issue or I can just skip these. I didn’t notice any issue on the site usage. Thanks anyway I love this plugin! :slightly_smiling_face:

إعجاب واحد (1)

I don’t think it should cause any issue, since it’s just a warning. And I reviewed the code, there is no use of whitelist anywhere.
Glad to see you love it :green_heart:

إعجاب واحد (1)

I really appreciate this plugin’s feature though I don’t use it right now for various reasons but I’ll keep an eye on the development. It seems nicely implemented.

Also, if nobody can be done about the 6 videos a day API limited, I really like this idea:

I’m not sure the plugin feature would be used by my community. This community is mainly split between our Discourse forum and a Facebook group (which I don’t own), and most of the people who share videos do it on Facebook for obvious reasons.
I guess I could try with a free Vimeo account and see how it goes.

Do you have long-term goals that you want to fulfill no matter what, or do you think your involvement will rely much on donations earnings?

3 إعجابات