[wp-meta] [Making WordPress.org] #3037: WordPress.tv: Show the views of the video

Making WordPress.org noreply at wordpress.org
Tue Dec 6 16:51:16 UTC 2022


#3037: WordPress.tv: Show the views of the video
--------------------------+---------------------
 Reporter:  Mte90         |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:
Component:  WordPress.tv  |  Resolution:
 Keywords:  needs-patch   |
--------------------------+---------------------

Comment (by mboynes):

 This sounds like a fantastic idea, and I'm interested in moving it
 forward. Has any work been done on it yet? If not, what is the process for
 contributing a feature as robust as this? Some decisions will need to be
 made (both architectural and operational). I'm content making all the
 calls myself if there is no process, or if that ''is'' the process :-).

 As I see it, this could be its own
 [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.tv/public_html
 /wp-content/themes/wptv2/plugins ""plugin""] in the wptv theme to keep its
 functionality orthogonal. The plugin will need to:

 1. Have a library for querying for video stats from the wpcom rest api.
    * I'm assuming that the site runs Jetpack (viewing source basically
 confirms that, since Jetpack's global styles are included). I'm hoping,
 but need to confirm, that we'll be able to use Jetpack to make an
 authenticated request to the video stats endpoint as
 [https://github.com/Automattic/jetpack/issues/8347#issuecomment-351208956
 not all authenticated endpoints are available to Jetpack]. We'll want to
 confirm this early in the process, as it could introduce a significant
 wrinkle. If Jetpack can't do this out of the box, we're not out of
 options, but it would be harder.
 2. Provide an API endpoint to the frontend for getting stats for a given
 video asynchronously. We won't want to query the wpcom api during pageload
 or else we'll adversely impact page speed as well as make the entire site
 significantly more fragile.
    * Caching will be important, as well as finding the right balance of
 cache duration (I lean toward a stepped approach here based on the age of
 the video, ranging from 5 minutes for new videos to 24 hours for older
 videos).
    * We'll have to make a decision about the scope and visibility of this
 endpoint. Should it be another public, documented API endpoint? Public but
 undocumented? Private-ish (nonce-secured), for ddos-protection? Left to my
 own devices, I would make it public but undocumented at the start to err
 on the side of public but maintain the option of locking it down if it
 becomes a problem.
 3. Provide a UX component that gets the stats for a video and renders it.

 Is there documentation anywhere on building a local development
 environment for wordpress.tv? I can certainly wing it using
 [https://meta.trac.wordpress.org/browser/sites/trunk the source in svn]. I
 get the gist of how the code is organized, but it would be nice to know
 I'm not missing a step.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/3037#comment:9>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list