|
Great! Thanks for the clarification.
So main question is, without the server helping us, just the client code can achieve the fast-fwd, rewind features & mainly without downloading the whole file?
I saw an Android doc that talks about file open type as "MEDIA_STREAM" & it did not talk about the server setup. It looked like it could stream a flat file from storage blobs.
So the confusion.
If I want to set up a streaming feature do I need to work both on client & server side?
Yet another thing in the mix is, I give a flat file URL from storage blobs or any server & Windows media player streams it. (Like without downloading the file & allow us to fast-fwd)
So a bit lost on this topic.
|
|
|
|
|
If you want to create your own streaming server/service, you obviously have to work on the server side (that's why it called server)... On the other end you need something that can talk to that server, so you need to work on the client side too...
There are lot of articles about it (and even some wannabe standard-like approaches), look for them and come back if you have any questions to solve (but go for the programming forums that time)...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
|
Nowadays you don't need to use RTMP anymore to get streaming, the S3-native HTTP streaming is perfectly fine and enables streaming playback in a simpler way then RTMP. If you are only looking for audio streaming, just putting the files in S3 is sufficient. If you are looking for video you should consider using HLS or MPEG-DASH (again the files are just in S3). If you have many customers combine that with a CloudFront web distribution for better performance. Apart from the simplicity, this does not require proprietary libraries
There you go![^]
|
|
|
|
|
Partial methods. I'll let you do your own research, but I cannot identify a single case where the use of a partial method would be beneficial, desired, or warranted.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
At first glance, it looks they are coming back to the hatred C/C++ header/source file mechanism.
|
|
|
|
|
CPallini wrote: they are coming back to the hatred rational, sensible, beloved C/C++ header/source file
FTFY
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
It's for use in a partial class , so you could declare the partial method in the designer code for a WinForms app for example, and implement it in the user defined code for the same class. The difference is that the method can be called from the designer code because it will compile cleanly.
This is still the case if the implementation of the partial method is never provided: the compiler will remove the partial method and the call to it if the concrete version is not written, and you still won't get a compiler error.
Think of it as a sort-of optional private abstract method and you're about there.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Right. We use partial classes/methods all the time with EF. You extend and EF entity with extra properties and methods if needed. The entity can change in EF, but the partial class/method remains the same.
Very useful. use it all the time.
|
|
|
|
|
I use it frequently. I find it simpler to use than Interface.
__________________
Lord, grant me the serenity to accept that there are some things I just can’t keep up with, the determination to keep up with the things I must keep up with, and the wisdom to find a good RSS feed from someone who keeps up with what I’d like to, but just don’t have the damn bandwidth to handle right now.
© 2009, Rex Hammock
|
|
|
|
|
Where is YAGNI when you need it. Google trends[^] results sort of agree with your feelings, as do I.
|
|
|
|
|
Definitely YAGNI. Will definitely be asked about it in a job interview.
|
|
|
|
|
It's mostly for generated code
|
|
|
|
|
It's still pointless.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I can't say I have ever found a use for it - although that might be because I didn't know it existed until your post
|
|
|
|
|
It is most certainly NOT pointless. You just haven't found a use case for it yet.
|
|
|
|
|
The cool thing in the code below is that if you don't define LOGGING, not only does the partial method go away, but any calls to the method are also removed.
#define LOGGING
using System;
namespace PartialMethodTest
{
partial class Foo
{
partial void Log(string msg);
public void DoSomething()
{
Log("Fizbin");
}
}
#if LOGGING
partial class Foo
{
partial void Log(string msg)
{
Console.WriteLine(msg);
}
}
#endif
class Program
{
static void Main(string[] args)
{
new Foo().DoSomething();
}
}
}
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Quote: but any calls to the method are also removed. Wouldn't that be disastrous if the method is intended to produce side-effects?
|
|
|
|
|
CPallini wrote: if the method is intended to produce side-effects
If the programmer is a donkey, giving him/her a compiler is disastrous.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Unless you are haskelling yourself too much, most methods do have side effects.
|
|
|
|
|
"Side" effects are really something that need to be reduced. Methods should have only intended effects and possibly no side effect.
If a method is to be implemented by the user of a class then it is part of the 'contract' to be respected when writing the user component - meaning it's up to the end user (programmer) to implement all the required effects and side effects.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
modified 16-Jan-19 10:56am.
|
|
|
|
|
Intended-side-effects were intended . That is side-effects in the functional meaning (in constrast with 'pure' functions, Haskell was the hint).
Unintended side effects are just evil.
|
|
|
|
|
Judging by the restrictions imposed on partial methods: they cannot have return value (only void ) or out parameters, they are intended to have side effects.
Whether or not it is disastrous to skip side effect is another question. In original example (logging) it is not.
|
|
|
|
|
Yes, indeed.
The original example showed a safe usage.
|
|
|
|
|
CPallini wrote: Wouldn't that be disastrous if the method is intended to produce side-effects?
Where I used to work, that was an every day occurrence, both in the code and in the meetings with the managers.
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|