Code Monkey home page Code Monkey logo

agoraio / agora-wordpress Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 13.0 22.63 MB

The Agora Video for WordPress plugin allows you to easily add live broadcast or video conferencing functionality into your posts and pages.

Home Page: https://wordpress.org/plugins/wp-agora-io

License: GNU General Public License v2.0

PHP 43.76% CSS 15.98% JavaScript 39.64% Hack 0.62%
agora-video video-call video-conferencing video-streaming wordpress wordpress-plugin

agora-wordpress's People

Contributors

amritpal-bigstep avatar digitallysavvy avatar ekaansharora avatar jalamprea avatar kamaljeet-truetech avatar kaushal-designer avatar nitin-kumar-bs avatar sanjeevbigstep avatar sidsharma27 avatar williamdxz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agora-wordpress's Issues

Mute all users' audio upon entering channel [FEATURE]

Is your feature request related to a problem? Please describe.
Currently when an admin sets up a communication channel, it's not possible to have all users join with their audio muted.

Describe the solution you'd like
Add a shortcode autoMtue that will allow admin users to set whether all users join muted or not.

How to Broadcast?

I am still struggling with this problem from January.

You previously mentioned:

In the image if you take a look at the people icon in the upper left of the Agora window, you'll notice that the number 2 next to the icon, this means two users are in the channel that are set up to broadcast streams, and in this case the local user has their video muted or disabled.

The number is (1) until a guest joins, but then it becomes (2). As this is supposed to be a broadcast rather than a communication I am not sure why this is happening?

The guest doesn't have any wordpress credentials, so why would this occur?

Setup Public Wordpress

setup a WordPress install and install the plugin for testing.

make sure ftp is enabled

Screen Share not working in Chrome [BUG]

Describe the bug
When clicking on the Share Screen icon in a group, Chrome gives the following error…

AgoraRTCSDK-3.0.2.121.js:1 21:48:37:957 Agora-SDK [ERROR]: [547584703] Media access PluginNotInstalledProperly: No response from Chrome Plugin. Plugin not installed properly.

Also, the chat icon does not display at all when using the Agora.io Fullscreen template.

All ad blocker extensions disabled.

To Reproduce
Steps to reproduce the behavior:

  1. open Agora channel (communication/broadcasting) in chrome browser
  2. Click to start screen sharing
  3. See fail message

Expected behavior

  1. open Agora channel (communication/broadcasting) in chrome browser
  2. Click to start screen sharing
  3. See screen share

Browser
Chrome Version 80.0.3987.163 (Official Build) (64-bit)

[FEATURE] Show Message to user when they deny permissions

Is your feature request related to a problem? Please describe.
Currently when a user joins a channel they are prompted with camera permissions. In some instances the user may deny camera/mic permissions. This causes the stream init to fail. The user is still added to the RTM channel so the other users can see a user in the channel but there is no video/audio added to the channel. This gives off the impression that there is an error with the video chat even though it is human error causing the issue.

Describe the solution you'd like
Can there be a message on the screen to alert the user that their video and audio are not visible because they did not give permission. Can there be a prompt for the user to enable their camera/mic permissions?

Also need to show a message to remote users that Guest/"XXX" user has joined the channel without their video/audio enabled.

Describe alternatives you've considered
N/A

Additional context
N/A

[BUG] Screen Share fails on Safari

Describe the bug
When trying to screen share in Safari it fails with error that screen share was not started from user interaction.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://demo.wpagoravideo.com/index.php/communication-room/ using Safari
  2. Click the share screen button
  3. See error

Expected behavior
Screen share is triggered on click so the user should be able to share the screen.

Additional context
This error is thrown because the stream is created and initialized within a callback, so the user interaction property is not propagated as part of the init causing the failure.

Channels Access Privileges [FEATURE]

Is your feature request related to a problem? Please describe.
Currently the plugin doesn't support restricting channel access. Whether it is limiting access to specific users, or password protecting channels.

Describe the solution you'd like
WordPress's user management features could be used to restrict channel access to specific users.

Along with WordPress user management, it would be good to allow admin's to set passwords on channels, that a user would need to enter to be able to join a channel.

This could be either a shortcode or a channel setting.

Additional context
Agora SDK supports password protected channels

Appearance Configuration

  • Allow users to set button text (optional). Provide default text "Watch the Live Stream"
  • Allow user to toggle (hide/show) the icon on the button.

Mute users [FEATURE]

Is your feature request related to a problem? Please describe.
Within the communication mode there is the ability for many users to join a channel and broadcast audio and video into the channel. There is occasion where this could become disruptive to the group communication.

Describe the solution you'd like
There should be a feature to allow users to mute each other, both audio and video.

Additional context
The feature should be enabled/disabled by the admin as a channel setting or shortcode setting.

sanitize, escape, and validate POST calls

Please sanitize, escape, and validate your POST calls

When you include POST/GET/REQUEST/FILE calls in your plugin, it's important to sanitize, validate, and escape them. The goal here is to prevent a user from accidentally sending trash data through the system, as well as protecting them from potential security issues.

SANITIZE: Data that is input (either by a user or automatically) must be sanitized. This lessens the possibility of XSS vulnerabilities and MITM attacks where posted data is subverted.

VALIDATE: All data should be validated as much as possible. Even when you sanitize, remember that you don’t want someone putting in ‘dog’ when the only valid values are numbers.

ESCAPE: Data that is output must be escaped properly, so it can't hijack admin screens. There are many esc_*() functions you can use to make sure you don't show people the wrong data.

To help you with this, WordPress comes with a number of sanitization and escaping functions. You can read about those here:

https://developer.wordpress.org/plugins/security/securing-input/
https://developer.wordpress.org/plugins/security/securing-output/

Remember: You must use the most appropriate functions for the context. If you’re sanitizing email, use sanitize_email(), if you’re outputting HTML, use esc_html(), and so on.

Clean everything, check everything, escape everything, and never trust the users to always have input sane data.

Example(s) from your plugin:

Agora-Word-Press/public/class-wp-agora-io-public.php:84: $cid = $_POST['cid'];

Agora-Word-Press/admin/class-wp-agora-io-admin.php:246: ? (array) $_REQUEST['channel']
Agora-Word-Press/admin/class-wp-agora-io-admin.php:247: : (array) $_POST['post_ID'];

Token Server Setting

Since the Agora WP Plugin will have the Token generation functionality built in we need to change the Token Server Settings on the Settings page to be a "Certificate" instead of "Server URL"

RTMP Push/Inject Description

to give users some context as to how to use RTMP push/pull, we need to have a short description within the modal window (below the url input field).

Please leave some room for use to add a few lines of text and possibly some links.

Customize the Recording Settings [FEATURE]

Is your feature request related to a problem? Please describe.
Currently there is only a single Cloud Recording layout supported

Describe the solution you'd like
Add a section in the channel settings to allow admin users to modify the default settings for the recording config.

Descriptions for Push/Inject external streams

Within the admin dashboard when creating a channel there are two sections with settings, one set for Push to External Streams and one set for Inject External Streams.

Each fo these settings section needs to have a description to ensure WP users understand the difference and how/when to use each.

Full Screen UI [FEATURE]

Is your feature request related to a problem? Please describe.
In the current UI templates there is no option to full screen the video.

Describe the solution you'd like
Add a button that launches the video UI in a full screen while hides the WP UI.

[BUG] S3 Cloud recording

After ensuring the proper S3 credentials and bucket write, I am unable to record a session. I receive an error, but after turning debugging in Wordpress, the error is never displayed or logged....
Screen Shot 2020-11-30 at 9 07 04 PM

Desktop (please complete the following information):

  • OS: Mac 11.0.1
  • Browser: Chrome
  • Version: 86.0.4240.198 (Official Build) (x86_64)

I am running the webserver via AWS Lightsail on a bitnami Wordpress instance
Everything else appears to work just fine.

[BUG] Several Black Rectangles Appearing

Describe the bug

This note came from BigStep who has been working with us to extend the plugin after they troubleshooted the root cause:

"The issue is coming when there is an interruption in the internet connection, i.e., if the user's internet connection is affected then the peer leaves, in the plugin the div is not getting closed. This issue is in the core plugin."

To Reproduce
Steps to reproduce the behavior:

Several hosts can connect to a broadcast. When one of them drops (or internet disconnects), the black rectange keeps hanging and sometimes when the host reconnects, they are hidden behind the black rectangle and a tiny bit visible underneath.

For example 3 hosts, A, B, C - If C gets disconnected and reconnects, then there are 4 videos, with one black rectangle where C used to be and the new C video. If it happens again to C, then there are 5 videos with two black rectangles, and it goes on and on.

Expected behavior
When a host leaves, only the remaining hosts should remain on the screen. Not a black rectangle where the host was before they left or were abruptly disconnected.

Screenshots
See attached screenshots

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome, Safari, Edge

Agora Bug 1
Agora Bug

Push to External Source

When pushing to an external CDN, the CDN will provide an RTMP url along with the private key. These values are used within Agora as a single string. To ensure the user setups up the structure correctly we should have two inout fields, once for the URL and then one for the Key.

Then under the hood, we can concat the two to make sure its in the proper format for the Agora SDK.

Scalable Multi Users UI [FEATURE]

Is your feature request related to a problem? Please describe.
Currently the plugin supports up to 17 users within a single channel (communication/broadcast) but the current UI templates are not visually appealing and do not scale well.

Describe the solution you'd like
We need to implement UI templates that scale from 1 to 17 broadcasters in both broadcasting and communication channels.

Describe alternatives you've considered
Currently a developer has to create their own UI templates.

[FEATURE] show network stats as a meter

Is your feature request related to a problem? Please describe.
Currently when the end user is experiencing a poor c

Describe the solution you'd like
The Agora Web SDK supports showing the in-call stats, such as time and connection strength. It would be nice to show to the user their connection strength as a meter, and on click or mouse-hover it can show more details stats as a pop-out. Details can include latency, call-time, etc.

Describe alternatives you've considered
NA

Additional context
NA

Define Shortcodes

define what the short code will look like, consider what variables can be passed in

Change Plugin Name

Currently the plugin is named "Agora-Channels", but it should be "Agora.io"

Cloud Recording

Add Record button between camera button and end-call button.

Only users to view record button are:

Broadcast- host only
Communication - any user with role of writer or above... subscriber and non registered users will not see record button

[BUG] Update to 2.0.8 and Agora no longer works on mobile devices - CRITICAL

Describe the bug

This is a critical issue. After updating to the latest version, Agora not longer works from a mobile device. All the buttons are not clickable and the video/audio doesn't work. It works well when viewing from a laptop, but can no longer connect from a mobile device. I tried rolling back . The dropdown for the audio and video devices no longer work as well.

This is a critical issue as we're going live tomorrow.

To Reproduce
Steps to reproduce the behavior:

  1. Please contact us for an internal link to test

Multiple hosts [FEATURE]

Is your feature request related to a problem? Please describe.
Currently within the broadcast channel settings only 1 user can be designated a host.

Describe the solution you'd like
Within the channel settings, add support for multiple users to be set as the hosts (limit to 17)

[BUG] Screen Share

Describe the bug
When a user starts and ends a screen share session, no other user is able to start a new screen share.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://demo.wpagoravideo.com/index.php/communication-room/ using two tabs
  2. In one tab click to share screen, then end the share screen
  3. In the other tab, click the share screen button
  4. See error, "screen share already in progress"

Expected behavior
Second user should not see an error, there is no other screen share. User should be able to start sharing their screen.

Only the broadcaster should be shown?

I am using the shortcode:
[agora-broadcast channel_id="11" videoProfile="720p_3"]

I am the only person broadcasting, the viewer clicks "Watch the live screen".
The number top left changes from 1 to 2.
The page now shows my broadcast plus an extra space?

As the only broadcaster, the only thing that should be shown in my broadcast?

Screenshot 2021-03-29 at 14 36 37

[BUG] Time-Sensitive: Location in code to change "Microphone Unmute" icon

Describe the bug

Hi there,

I know one of the workarounds Agora added for the audio issues is to display a grey mute icon on the video and then users have to tap on the video to unmute in their browsers (mostly a Safari issue).

Can you please point us to where in the code this icon is being displayed? We would like to change it so it's more visible (red background, etc) as well as add the following text - "TAP TO UNMUTE" - so it is clearly legible and visible for the user.

Please advise.
Thanks

Lola

MOBILE UI [FEATURE]

Is your feature request related to a problem? Please describe.
Currently the WordPress plugin is does not properly adjust for mobile screens.

Describe the solution you'd like
Create a mobile UI for users using the WP plugin on mobile.

Additional context
We should also show a message on mobile browsers that are not supported

Can join chanel from android app?

I try join channel from open live demo app, where i have build with same appid. start streaming from post wordpress, but in android app, i cant see streaming. how we can join chanel streaming from web post then other user join from their mobile phone??

[BUG] Problems persist with Chat Window

Describe the bug

When a mobile phone is turned horizontally, the chat window still keeps getting cut off. We've tried to fix this with CSS but to no avail. The other issue is that the Chat window is duplicating messages that are being typed.

Please see both attached screenshots.

Expected behavior
The Chat window shouldn't be cut off and should only display messages once.

Screenshots
If applicable, add screenshots to help explain your problem.
IMG_9350
IMG_9352

Smartphone (please complete the following information):

  • Device: [e.g. iPhone
  • Browser: Safari

SetVideoProfile via shortcode

set the default video profile to 480p_9 and allow the user to pass a value for videoProfile as part of the shortcode.

Use User Icon

Whenever a broadcaster mutes their video, show the icon associated with the user's account.

se wp_enqueue commands

Please use wp_enqueue commands

Your plugin is not correctly including JS and/or CSS. You should be using the built in functions for this:

https://developer.wordpress.org/reference/functions/wp_enqueue_script/
https://developer.wordpress.org/reference/functions/wp_enqueue_style/

And remember you can use this function to add inline javascript:

https://developer.wordpress.org/reference/functions/wp_add_inline_script/

If you're trying to enqueue on the admin pages you'll want to use the admin enqueues

https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
https://developer.wordpress.org/reference/hooks/admin_print_scripts/
https://developer.wordpress.org/reference/hooks/admin_print_styles/

Example(s) from your plugin:

Agora-Word-Press/public/views/agora-fullscreen-template.php:113: <script src="/js/agora-communication-client.js"></script>
Agora-Word-Press/public/views/agora-fullscreen-template.php:114: <script src="/js/communication-ui.js"></script>

Recording Settings [FEATURE]

Describe the bug
Recording is done in Portrait mode

To Reproduce
Steps to reproduce the behavior:

  1. Setup a Broadcast
  2. Click on the record button when the broadcast is live
  3. Check Amazon S3
  4. It recorded the landscape video in portrait mode.

Expected behavior
It should be landscape

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 81.0.4044.113 (Official Build) (64-bit)

Additional context
Is this a simple fix?

Support for Token Server into the plugin

To simplify the process to use the plugin for WP Users, this plugin will embed its own Token Server.
This Token Server should be implemented based on the Agora SDK Docs:
https://docs.agora.io/en/Audio%20Broadcast/token_server_php?platform=PHP

This plugin should expose the Token Server URL directly from the plugin.
This embebed server will help users to avoid the creation of custom token server and they will only need to setup the certificate ID from Agora on the WP Settings.

This task is blocking #6

[BUG] URGENT - Audio and Disconnect Problems with Broadcast Channel

Describe the bug

  1. If a host drops off the session and reconnects, sometimes they may not hear the other host even though they see each other. We need to turn "sometimes" to "always" hearing. This is a huge problem.

  2. If the host drops off (for example, Internet gets disconnected), then all the viewers get a "Livestream ended" message and may leave. But if they refresh their screen, then they would see the host again, once reconnected.

#1 is mission-critical because once fixed, it can be a temporary workaround for #2 where there is always one connected host.

To Reproduce
Steps to reproduce the behavior:

  1. Login first at https://marketplace.localpurse.com/login

Host 1

Username: -
Password: -

Host 2

Username: -
Password: -

  1. Then go to this link - https://marketplace.localpurse.com/intrepid/morocco

Expected behavior

The audio has to work always. Also, when the host disconnects by mistake, is there anything or anyway to bring them back into the session without it ending the stream for everyone?

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Chrome
  • Version: 87

Additional context
This is quite urgent as we are planning a broadcast to hundreds of people in 10 days!

define names for functions

Generic function (and/or define) names

All plugins must have unique function names, namespaces, defines, and classnames. This prevents your plugin from conflicting with other plugins or themes. We need you to update your plugin to use more unique and distinct names.

A good way to do this is with a prefix. For example, if your plugin is called "Easy Custom Post Types" then you could use names like these:

function ecpt_save_post()
define( ‘ECPT_LICENSE’, true );
class ECPT_Admin{}
namespace EasyCustomPostTypes;

Don't try to use two letter slugs anymore. We host nearly 100-thousand plugins on WordPress.org alone. There are tens of thousands more outside our servers. Believe us, you’re going to run into conflicts.

You also need to avoid the use of __ (double underscores), wp_ , or _ (single underscore) as a prefix. Those are reserved for WordPress itself. You can use them inside your classes, but not as stand-alone function.

Related to this, using if (!function_exists(‘NAME ‘)) { around all your functions and classes sounds like a great idea until you realize the fatal flaw. If someone else has a function with the same name and their plugin or theme loads first, your plugin breaks. Using if-exists should be reserved for shared libraries only.

Remember: Good prefix names are unique and distinct to your plugin. This will help you and the next person in debugging, as well as prevent conflicts.

Example(s) from your plugin:

Agora-Word-Press/includes/class-wp-agora-cloud-recording.php:12:define('MIN_RAND_VALUE', 10000000);
Agora-Word-Press/includes/class-wp-agora-cloud-recording.php:13:define('MAX_RAND_VALUE', 4294967295);
Agora-Word-Press/includes/token-server/AccessToken.php:3:class Message
Agora-Word-Press/includes/token-server/AccessToken.php:54:class AccessToken

Grammar error in "rejoin" message [BUG]

Describe the bug
If a user quits the chat group, this message is displayed…

“Rejoin to this channel”

This is not good grammar, which reflects badly on the site owner. Please change this text to read..

“Rejoin this channel”

To Reproduce

  1. Join a communication channel
  2. Use the hang up button to leave the channe
  3. The message displayed… “Rejoin to this channel”

Expected behavior
Message should say “Rejoin this channel”

[BUG] Hosts cannot see Broadcast viewer's chat questions

Describe the bug

With the Broadcast channel, the hosts can see their own chats, but when a Broadcast viewer types their name and tries to connect in the chat to type their questions, the hosts cannot see the viewers.

To Reproduce
Steps to reproduce the behavior:

To Reproduce
Steps to reproduce the behavior:

Login first at https://marketplace.localpurse.com/login

Host 1

Username: -
Password: -

Host 2

Username: -
Password: -

Then go to this link - https://marketplace.localpurse.com/intrepid/morocco

Incognito - Broadcast viewer

Go directly to this link - https://marketplace.localpurse.com/intrepid/morocco

Expected behavior

A clear and concise description of what you expected to happen.

The hosts need to be able to read the Broadcast viewer's question.

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Chrome
  • Version : 87

Stream is not subscribed on Stream inject [BUG]

Describe the bug
Currently if you add a url for stream inject, it does nothing. In the console it shows that the stream is added to the channel but neither the broadcaster nor the audience can see the stream.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.