mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Initial source commit.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Casting in Grayjay App
|
||||
|
||||
## Introduction
|
||||
|
||||
The Grayjay app supports multiple protocols to cast your favorite content onto a bigger screen. These protocols include FCast, Chromecast, and AirPlay. The list is prioritized in the order of preference for the following reasons:
|
||||
|
||||
1. **FCast**: Open protocol, direct streaming support, no need for proxying through mobile devices. Click [here](https://fcast.org/) for more details and where to download.
|
||||
2. **Chromecast**: Requires proxying but supports DASH streaming.
|
||||
3. **AirPlay**: Does not support DASH and hence limited in supporting content sources.
|
||||
|
||||
The "FCast Receiver" app is available on Google Play store for both Android and Android TV.
|
||||
|
||||
## How to Use Casting in Grayjay App
|
||||
|
||||
### Finding the Casting Icon
|
||||
|
||||
1. Open the Grayjay app on your mobile device.
|
||||
2. Click on the casting icon located in the top-right corner of the screen.
|
||||
|
||||
### Auto Discovery (mDNS)
|
||||
|
||||
- Once the casting icon is clicked, auto discovery of nearby devices will start. Note that this uses mDNS and could be slow.
|
||||
|
||||
### Manual Device Addition
|
||||
|
||||
- Alternatively, you can manually add your device by clicking on the "Add" button, which will appear once you click the casting icon.
|
||||
|
||||
### Playback Controls
|
||||
|
||||
- Once connected, you can use the Grayjay app to control the playback, including pause, play, seek, and volume adjustments.
|
||||
|
||||
## Why Choose FCast Over Others?
|
||||
|
||||
1. **Open Source**: The protocol is open source, offering greater freedom and potential for customization.
|
||||
2. **Direct Streaming**: Unlike Chromecast, which proxies media through the mobile device, FCast supports direct streaming to the receiver.
|
||||
3. **Multi-Platform**: The FCast Receiver app is available for both Android and Android TV.
|
||||
|
||||
By utilizing the built-in casting options, you can enjoy a seamless and versatile streaming experience in Grayjay.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# Guide to Linking Profiles with Harbor on Polycentric
|
||||
|
||||
## Introduction
|
||||
|
||||
Polycentric provides a decentralized social media experience, focused on self-sovereign identity and censorship-resistance. Harbor enables you to effortlessly unify your presence across multiple platforms. This guide explains how creators can link their profiles using the Harbor app and what users can expect to see.
|
||||
|
||||
For more details:
|
||||
- Click [here](https://harbor.social/) for more details about the Harbor app.
|
||||
- Click [here](https://docs.polycentric.io/) for more details about the Polycentric protocol.
|
||||
|
||||
---
|
||||
|
||||
## For Creators: How to Link Your Profiles
|
||||
|
||||
### Step 1: Create a Harbor Identity
|
||||
|
||||
1. Download and install the Harbor app.
|
||||
2. Create a new identity within Harbor.
|
||||
|
||||
### Step 2: Create a claim
|
||||
|
||||
1. In Harbor, create a claim for a specific channel.
|
||||
|
||||
### Step 3: Get the claim verified
|
||||
|
||||
1. Follow the instructions to obtain a vouch for the claim.
|
||||
2. Once it is vouched for by a trusted authority, your profiles will be linked.
|
||||
|
||||
### Benefits for Creators
|
||||
|
||||
- Unified feed across all platforms.
|
||||
- Increased visibility and credibility through vouches.
|
||||
- Privacy protection; remain anonymous if you choose.
|
||||
|
||||
---
|
||||
|
||||
## For Users: What to Expect
|
||||
|
||||
### Unified Feeds
|
||||
|
||||
When you're subscribed to a creator's channel that's linked via Harbor, you'll see a unified feed from all their linked platforms.
|
||||
|
||||
### Enhanced Privacy
|
||||
|
||||
Creators can choose to be anonymous, safeguarding their identities while still sharing valuable content.
|
||||
|
||||
---
|
||||
|
||||
Thank you for using Polycentric and Harbor to create a more unified and secure online experience.
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# Package: Http
|
||||
Package http is the main way for a plugin to make web requests, and is likely a package you will always need.
|
||||
It offers several ways to make web requests as well as websocket connections.
|
||||
|
||||
Before you can use http you need to register it in your plugin config. See [Packages](_blank).
|
||||
|
||||
## Basic Info
|
||||
Underneath the http package by default exist two web clients. An authenticated client and a unauthenticated client.
|
||||
The authenticated client has will apply headers and cookies if the user is logged in with your plugin.
|
||||
See [Plugin Authentication](_blank).
|
||||
These two clients are always available even when the user is not logged in, meaning it behaves similar to the unauthenticated client and can safely use it either way.
|
||||
|
||||
>:warning: **Requests are synchronous**
|
||||
>If you need to make multiple requests concurrently you **SHOULD** use the batch() method so that these requests happen concurrently. See [http.batch()](#batching).
|
||||
|
||||
|
||||
## Common Usage
|
||||
|
||||
### Basic Requests
|
||||
If you just want to make basic web requests you can use the following methods.
|
||||
|
||||
Methods:
|
||||
```kotlin
|
||||
http.GET(url: String, headers: Map<String, String>, useAuthClient: Boolean): BridgeHttpResponse;
|
||||
http.POST(url: String, body: String, headers: Map<String, String>, useAuthClient: Boolean): BridgeHttpResponse;
|
||||
http.request(method: String, url: String, headers: Map<String, String>, useAuthClient: Boolean): BridgeHttpResponse;
|
||||
http.requestWithBody(method: String, url: String, body: String, headers: Map<String, String>, useAuthClient: Boolean): BridgeHttpResponse;
|
||||
```
|
||||
All usages of these methods are identical except for its parameters.
|
||||
Example:
|
||||
```javascript
|
||||
const resp = http.GET("yourUrl", {your: "headers"}, false);
|
||||
if(!resp.isOk) {
|
||||
//Handle your exception
|
||||
throw new ScriptException("Something went wrong while doing x with y");
|
||||
}
|
||||
//eg. for a json response
|
||||
const resultData = JSON.parse(resp.body);
|
||||
//Use your json result
|
||||
```
|
||||
|
||||
### Web Socket
|
||||
...
|
||||
|
||||
### Custom Clients
|
||||
You might run into scenarios where you have to maintain multiple web clients with different cookies and configurations.
|
||||
In this scenario you can declare a custom client that you can configure and which keeps its own cookies etc.
|
||||
Method:
|
||||
```kotlin
|
||||
//newClient will copy the current state of either the unauthenticated or authenticated client.
|
||||
//This includes auth cookies/headers.
|
||||
http.newClient(useAuthClient: Boolean);
|
||||
```
|
||||
Custom clients support all methods that the root http package supports, except that the useAuthClient parameter is no longer available as it is implicit on your created client.
|
||||
Example:
|
||||
```
|
||||
const myCustomClient = http.newClient(true);
|
||||
const resp = myCustomClient.GET("yourUrl", {});
|
||||
```
|
||||
A custom client has the following customizing methods:
|
||||
```kotlin
|
||||
//Adds default headers that are added on every request
|
||||
myClient.setDefaultHeaders(defaultHeaders: Map<String, String>);
|
||||
//If cookies should be applied to requests
|
||||
myClient.setDoApplyCookies(apply: Boolean);
|
||||
//If cookies should be updated from request responses
|
||||
myClient.setDoUpdateCookies(update: Boolean);
|
||||
//If new cookies should be added if found in responses
|
||||
myClient.setDoAllowNewCookies(allow: Boolean);
|
||||
```
|
||||
|
||||
### Batching
|
||||
All requests made by the HTTP package are synchronous, this is important to know and handle correctly. In the cases where you need to fire multiple requests without needing to know the response first you can use the .batch() method.
|
||||
```javascript
|
||||
http.batch(): BatchBuilder;
|
||||
```
|
||||
You can use batch to setup multiple http calls that will all be fired at the same time. The batch call supports all methods you can use on http as well. In addition to client-specific versions.
|
||||
Example:
|
||||
```javascript
|
||||
const someCustomClient = http.newClient(false);
|
||||
|
||||
const responses = http.batch()
|
||||
.GET("someUrl", {})
|
||||
.POST("someUrl", "", {})
|
||||
.request("HEAD", {})
|
||||
.clientGET(someCustomClient, "someUrl", {})
|
||||
.execute();
|
||||
//.execute() will run your requests. Responses are returned in their respective order.
|
||||
const respGET = responses[0];
|
||||
const respPOST = responses[1];
|
||||
const respHEAD = responses[2];
|
||||
const respClientGET = responses[3];
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
# Using Polycentric for Comments and Ratings
|
||||
|
||||
## Why Polycentric?
|
||||
|
||||
Social media platforms often wield significant control over user data and content. This centralized control creates various issues such as data privacy concerns, content manipulation, and censorship. Polycentric offers an alternative by employing a distributed network, where you, the user, have more sovereignty over your data and interactions.
|
||||
|
||||
### Key Benefits
|
||||
|
||||
- **Choose Your Server**: In Polycentric, you can select the server you wish to interact through. This creates healthy competition among servers and provides options for users dissatisfied with content moderation or server policies.
|
||||
|
||||
- **Ownership of Likes/Dislikes**: As a content creator, the likes and dislikes on your posts are genuinely yours. Unlike centralized platforms, there's no leverage held over you by the hosting platform concerning your ratings.
|
||||
|
||||
- **Censorship-Resistance**: The distributed architecture makes it challenging to censor content across the entire network, giving voice to marginalized and underrepresented perspectives.
|
||||
|
||||
## How to Use Polycentric for Comments and Ratings
|
||||
|
||||
### Step 1: Create Your Self-Sovereign Identity
|
||||
|
||||
1. Download the [Grayjay](https://grayjay.app) application.
|
||||
2. Follow the wizard to create your identity secured by public-key cryptography by clicking the "Manage Polycentric Identity" button in the settings page.
|
||||
|
||||
### Step 2: Choose Your Server (still a work in progress)
|
||||
|
||||
1. Browse the list of available servers and select one based on your preferences for content moderation and community engagement.
|
||||
2. Connect to the server.
|
||||
|
||||
### Step 3: Link Your Content Channels
|
||||
|
||||
If you're a creator, link your various content channels using the Harbor app. This provides a unified feed for your subscribers across platforms. Click [here](./linking.md) for more details.
|
||||
|
||||
### Step 4: Engage with Content
|
||||
|
||||
You're now ready to comment, like, or dislike content securely and sovereignly. All the likes and dislikes are directly linked to your self-sovereign identity, ensuring true ownership.
|
||||
|
||||
### Step 5: Offline Capabilities
|
||||
|
||||
Polycentric allows for offline browsing and interactions. Any offline activity will sync upon re-establishing an internet connection.
|
||||
|
||||
By leveraging Polycentric, you empower yourself with more control, better privacy, and a truly decentralized social media experience.
|
||||
|
||||
Reference in New Issue
Block a user